May i ask, how do i remove words and letters from a string?
Example: is, are Example: -ing.
A sentence: A wolf is eating a sheep.
becomes: A wolf eat a sheep.
Thanks!
May i ask, how do i remove words and letters from a string?
Example: is, are Example: -ing.
A sentence: A wolf is eating a sheep.
becomes: A wolf eat a sheep.
Thanks!
Use replace method
String str = "A wolf is eating a sheep.";
str = str.replace("ing","");
or
str = str.replace("eating","eat");