装箱拆箱

xiaoxiao2021-02-27  171

public class BoxDemo { public static void main(String[] args) { Boolean i1 = false; Boolean i2 = false; System.out.println(i1 == i2);// true Integer a = Integer.valueOf(1); Integer b = 1; System.out.println(a == b);// true Integer d = new Integer(2); Integer c = 2; System.out.println(c == d);// false Integer e = 3; Integer f = 3; System.out.println(e == f);// true } }
转载请注明原文地址: https://www.6miu.com/read-14346.html

最新回复(0)