Created
August 20, 2012 10:14
-
-
Save ajduke/3402852 to your computer and use it in GitHub Desktop.
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 SuperClass { | |
public void display() { | |
System.out.println("Super"); | |
} | |
} |
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 SubClasss extends SuperClass { | |
public void display() { | |
System.out.println("Sub"); | |
} | |
private void access() { | |
display(); // invokes one in SubClass | |
super.display(); // invokes one in SuperClass | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment