Created
September 3, 2017 16:46
-
-
Save LazaroIbanez/e424eb8dcb77570f76756b11a52f5b3e to your computer and use it in GitHub Desktop.
super() example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class H extends H1 { | |
public H() { | |
super(50); | |
System.out.println(“From H constructor”); | |
} | |
public static void main(String args[]) { | |
H objectH = new H(); | |
} | |
} | |
class H1 { | |
public H1(int x) { | |
System.out.println(“From H1 constructor: “ + x); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment