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