If the member variables defined in the subclass have the same name as those defined in the parent class, the subclass hides the member variables inherited from the parent class. When a method is defined in the subclass, and the method name, return type, number of parameters are identical to a method of the parent class, the method inherited from the parent class of the subclass will be hidden. If you want to use the hidden member variables or methods of the quilt class in the subclass, you can use the keyword super [html] class student {int number; String name; student () // use the constructor {} student (int number, String name) {this. number = number; // use the this keyword to call the member variable this. name = name; System. out. println ("I am" + name + "my number is" + number) ;}} xiongyao @ xiongyao-Lenovo :~ /Java programming $ javac example7.java class univer_student extends student {boolean marital status; univer_student (int number, String name, boolean B) {super (number, name); marital status = B; System. out. println ("Marital status =" + marital status) ;}} public class example7 {public static void main (String args []) {univer_student zhang = new univer_student (9901, "Xiong Yao ", false) ;}} xiongyao @ xiongyao-Lenovo :~ /Java programming $ javac example7.javaxiongyao @ xiongyao-Lenovo :~ /Java programming $ java example7I am Xiong Yao my number is 9901 marital status = false