String string = "被检测的字符串";
System.out.println(string.contains("测"));//返回true表示字符串包含该字符(串)
查下javadoc就可以看到啦
/**
* Returns true if and only if this string contains the specified
* sequence of char values.
*
* @param s the sequence to search for
* @return true if this string contains {@code s}, false otherwise
* @since 1.5
*/
public boolean contains(CharSequence s)
"abcd".contains("ab") // true
"abcd".contains("b") // true
"abcd".contains("dd") // false