class B { private int i; B(int i) { this.i=i; } } public class Ex1 { public static void main(String[] args) { B b1=new B(20); B b2=new B(20); System.out.println(b1==b2);//b1==b2比较是内存地址 } }
相关文章:
class B { private int i; B(int i) { this.i=i; } } public class Ex1 { public static void main(String[] args) { B b1=new B(20); B b2=new B(20); System.out.println(b1==b2);//b1==b2比较是内存地址 } }
相关文章: