Integer a = new Integer(96354);
String b = "abc";
System.out.println(a.hashCode());
System.out.println(b.hashCode());
System.out.println(a.hashCode()==b.hashCode());
System.out.println(a.equals(b));
hashcode相同,值不一定相同
最新推荐文章于 2024-06-27 00:30:00 发布