how to check if string contains a word in java code example
Example 1: check if a string contains a character java
string.indexOf('a')
Example 2: string contains specific word in java
public boolean String.contains(CharSequence s);
string.indexOf('a')
public boolean String.contains(CharSequence s);