I had a question about the indexOf method. I want to find multiple cases of \"X\" in a string.
Suppose my string is \"x is x is x is x\", I want to find x in all of
String name = "alameer kaiser aziz"; String found = "a"; int num = name.indexOf(found); while (num >=0) { System.out.println(num); num = name.indexOf(found,num+1); }