package oop.Verebung;

public class instanceOf_Aufgaben {
	
	public static void main(String[] args) {
		A a = new A();
		B b = new B();
		Object o = new Object();
		B n = null;
		
		System.out.println(a instanceof Object); // False
		System.out.println(n instanceof A);// false, n ist null
		System.out.println(a instanceof Object);
		System.out.println(a instanceof B); // false
		System.out.println( n instanceof B );
		System.out.println( n instanceof Object );
		System.out.println( o instanceof B);

	}
	
	
}
class A {}

class B extends A {}