Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class A {
- public A() { m(); }
- public void m() {
- System.out.println(“m aus A“); }
- }
- public class B extends A {
- A a;
- public B() {
- a = new A();
- m(); }
- public void m() {
- a.m();
- System.out.println(“m aus B“); }
- public static void main(String[] args)
- { new B(); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement