check if word contains other word java code example Example: string contains specific word in java public boolean String.contains(CharSequence s);