import java.lang.Object; import java.lang.Integer; import java.lang.Boolean; interface Interface {} class Test implements Interface { } class Test2 { } public class InstanceOf { a = new Test(); test1() { return this.a instanceof Test; } test2() { return this.a instanceof Interface; } test3() { return this.a instanceof Integer; } }