Welcome![Sign In][Sign Up]
Location:
Downloads WEB Code JSP/Java
Title: 1 Download
 Description: Run the following procedure to use the super keyword analysis, as well as the parent class and subclass relationship between the hidden and rewriting class superClass {int x superClass () {x = 3 System.out.println (" in superClass: x = " +x) } void doSomething () {System.out.println (" in superClass.doSomething () " ) }} class subClass extends superClass {int x subClass () {super () // call constructor of superClass x = 5 System.out.println (" in subClass: x =" +x) } void doSomething () {super.doSomething () // call method of superClass System.out.println (" in subClass.doSomething () " ) // call x of superClass System.out.println (" super.x = " +super.x+" sub.x = " +x) }} public class inheritance {public static void main (String args [] ) {subClass subC = new subClass () subC.doSomething ()
 Downloaders recently: [More information of uploader 小馒头]
 To Search:
File list (Check if you may need any files):
 

第一题\.classpath
......\.project
......\.settings\org.eclipse.jdt.core.prefs
......\bin\test\inheritance.class
......\...\....\subClass.class
......\...\....\superClass.class
......\src\test\inheritance.java
......\...\....\superClass.java
......\bin\test
......\src\test
......\.settings
......\bin
......\src
第一题
    

CodeBus www.codebus.net