xxxxxxxxxx
String test = "My first arg test";
String[] words = test.split(" ");
for (String word : words) System.out.println(word);
xxxxxxxxxx
public static void main(String[] args) {
String[] KEYWORDS = new String[]{
"abstract", "assert", "boolean", "break", "byte",
"case", "catch", "char", "class", "const"};
String text = "operators such as quotation marks will help you
cut down on unhelpful resultsboolean";
if (Arrays.stream(KEYWORDS).anyMatch(text::contains)) {
System.out.println("Word Found");
}
}