7.3 字符串常量

public class HelloWorld {
    public static void main(String[] args){

        String input = null;
        if("yoo".equals(input)){// 如果input “yoo” 颠倒.会报错java.lang.NullPointerException
            System.out.println("www.yoo.com");
        }
    }

}
posted @ 2023-06-06 15:27  盘思动  阅读(2)  评论(0编辑  收藏  举报