Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test {
- public static void main(String[] args) {
- C c = new C();
- c.display(); //90 - don't do it!!
- }
- }
- class A {
- int x = 90;
- }
- class B extends A {
- void display() {
- System.out.println(super.x);
- }
- }
- class C extends B {
- int x = 80;
- }
Advertisement
Add Comment
Please, Sign In to add comment