How to search a word in a string?
For example
String text = \"Samsung Galaxy S Two\";
If I use text.contains(\"???\");<
List tokens = new ArrayList();
String text = "Samsung Galaxy S Two";
StringTokenizer st = new StringTokenizer(text);
//("---- Split by space ------");
while (st.hasMoreElements()) {
tokens.add(st.nextElement().toString());
}
String search = "axy";
for(int i=0;i Remove Break if you want to continue searching all the words which contains `axy`
}
}
output====>Galaxy