Long类型比较

Long类型比较

        Long a = 300L;
        Long b = 300L;
        long aa = a.longValue();
        long bb = b.longValue();
        //方式一
        System.out.println(a.equals(b));//true
        //方式二
        System.out.println(aa == bb);//true
发布了94 篇原创文章 · 获赞 44 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/qq_43639296/article/details/102718618