package VorlesungsFolien.Verebung;

public class A {
	
	public void f() {
		System.out.println("A");
	}
	
	public static void main(String[] args) {
		A a1 = new A();
		A a2 = new B();
		B b = new B();
		
		a2.f();
	}
}

class B extends A {
	
	public void f() {
		System.out.println("B");
	}
}