package chapter5;

public class Example05 {
    public static void main(String[] args) {
        String s1 = "我是王小明";
        String s2 = "我是";

        System.out.println("判断开头：" + s1.startsWith("我是"));
        System.out.println("判断结尾：" + s1.endsWith("小明"));
        System.out.println("判断包含：" + s1.contains("是"));
        System.out.println("判空：" + s1.isEmpty());
        System.out.println("判断相等：" + s1.equals(s2));
    }
}
