1) In the process of inheritance, the contants have same names in super class would not be overrided but be hidden. However the methods have same name and significantion in the super class would be replaced(overriding) in the subclass. When the upward transition happend, the orgin method is missed and the method in the super class's object would actually be the method in subclass.
Here is my test code.
package com.suncosmo.example; /** * Created by SunZhiCong on 2015/8/20. */ public class TestMain { public static void main(String args[]){ Human Tom = new Man("Tom"); System.out.println(Tom.getSex()); } } class Human{ protected String name = "Human"; protected String sex = "Humanity"; Human(){ System.out.println("Human!"); } Human(String name){ System.out.println("Human:"+name); this.name = name; } public String getSex(){ return this.sex; } } class Man extends Human{ //private String sex = "Male"; Man(String name){ //super(name); //this.name = name; this.sex = "Male"; System.out.println("Man:"+name); } public String getSex(){ System.out.println("Human"); return this.sex; } }