java check if a string contains a string code example Example: string contains specific word in java str_Sample.contains("Example"));