How can I construct a condition that if a phrase has the name "x", then "x" is ignored when the phrase is displayed?
Example:
if(item.contains("Text"))
{
//Then ignore "Text" and display the remaining mill
}
You can easily use :
String item = "This is just a Text";
if (item.contains("Text")) {
System.out.println(item.replace("Text", ""));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With