26 super keyword

super to use:

 

Cat public (String name, int month The) { 
/ **
* constructor configuration process must be called the child class to its parent class
* subclass configured default call the parent class constructor with no arguments
* can be called by the parent super () other methods are configured to allow access
* Super () must be placed in subclass constructor, and must be valid on the first line of code.
* Super () static method can not be used
when the * constructor method call, and this Super can not occur simultaneously
* /
Super (name, month the);
System.out.println ( "I parameterized constructor class method");
}

Guess you like

Origin www.cnblogs.com/CPU-Easy/p/12168533.html