【JAVA】给大家推荐一道有意思的java测试题。你知道答案吗?

作者:程序员小冰,CSDN博客:http://blog.csdn.net/qq_21376985
QQ986945193 公众号:程序员小冰

public class Test {

    /**
     * 
     * @author :程序员小冰
     * 
     * @新浪微博 :http://weibo.com/mcxiaobing
     * 
     * @version V1.0正式版 ctrl+y变小写
     * 
     * @process 主界面
     * 
     * @Note http://blog.csdn.net/qq_21376985
     * 
     * @dateTime 2016-3-14下午10:47:31
     * 
     */
    public static void main(String[] args) {
        String c = null, d = null;
        String m = c + d;

        String a = "abc";
        String b = "ab" + "c";
        /**
         * 得出输出结果
         */
        System.out.println(a.equals(b));
        System.out.println(a == b);
        System.out.println(m);

        new Test().test(null);
    }

    public void test(Object object) {
        System.out.println("object");
    }

    public void test(String string) {
        System.out.println("string");
    }
}
原文地址:https://www.cnblogs.com/mcxiaobing/p/5907341.html