Click here to watch in Youtube :
https://www.youtube.com/watch?v=38drYmvwbcM&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java super keyword (Invoke super class default constructor) |
public class SuperClass { public SuperClass() { System.out.println("Inside SuperClass default Constructor"); } }
public class SubClass extends SuperClass { public SubClass() { super(); System.out.println("Inside SubClass default Constructor"); } }
public class SuperTest { public static void main(String[] args) { SubClass subClassObj = new SubClass(); } }
Inside SuperClass default Constructor Inside SubClass default Constructor
https://sites.google.com/site/javaee4321/java/SuperKeywordDemo_invoke_defaultCons_App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/SuperKeywordDemo_invoke_defaultCons_App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/d8bcbd739d9d2ceaeec7ee56b1959925c6ec69d4/BasicJava/SuperKeywordDemo_invoke_defaultCons_App/?at=master
See also:
No comments:
Post a Comment