Skip to content

Commit

Permalink
Merge pull request #326 from shtunder/andrey
Browse files Browse the repository at this point in the history
Making the right conclusion
  • Loading branch information
shtunder authored Apr 4, 2021
2 parents 54513cb + cd80890 commit 31a762f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ public static void main(String[] s) {
}

public static class A {
public void method1() {
private void method1() {
System.out.println("A class, method1");
}

public void method2() {
System.out.println("A class, method2");
method1();
}
}

public static class B extends A {
public void method1() {
super.method2();
System.out.println("B class, method1");
}

Expand All @@ -38,6 +40,7 @@ public void method1() {

public void method2() {
System.out.println("C class, method2");
super.method1(); //+
}
}
}

0 comments on commit 31a762f

Please sign in to comment.