class fu{
static String name="zhangsan";
public void show(){
System.out.println("fu..."+name);
}
}
class zi extends fu{
public void show(){
System.out.println("zi..."+name.hashCode());
super.show();
}
}
public class Demo {
public static void main(String[] args) {
zi z=new zi();
z.show();
}
}
刚才回答问题遇到哈希值前面一个符号。咋回事?
//zi...-1432604556
//fu...zhangsan |
|