Created
May 29, 2017 14:31
-
-
Save girish3/4e8a26a643210b77c159a1149fc6c967 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// the example is in Java | |
class Base { | |
private int i = 0; | |
void inc1() { | |
i++; | |
} | |
void inc2() { | |
i++; | |
} | |
} | |
class Child extends Base { | |
@Override | |
void inc2() { | |
inc1(); | |
} | |
} | |
Child child = new Child(); | |
child.inc2(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment