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比较是内存地址 
        
    }

}
View Code

相关文章:

  • 2021-11-10
  • 2021-11-09
  • 2022-02-04
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
猜你喜欢
  • 2021-07-03
相关资源
相似解决方案