class Demo4
{
public static void main(String[] args)
{
System.out.println(new Person());
Person p = new Person();
System.out.println(p.getClass().getName()+'@'+Integer.toHexString(hashCode()));//这里说hashCode()无法从静态上下文中引用非静态hashCode()
System.out.println(p);
}
}
class Person
{
}
|
|