I have a Sentence
String query = "This is a sample Sentence"
I extracted all the words from it.
String[] queryWords = query.split(" ");
... and this gives;
[ "This", "is", "a", "simple", "sentence"]
Now I want to add wildcards to each word.
[ "%This%" , "%is%" , "%a%" , "%simple%" , "%sentence%" ]
To add % symbol at the beginning and end of each word.
How can i do this?
queryWords[i] = "%" + queryWords[i] + "%";in a loop