Hello java members this is my first post as u can see so i have been confused with this small part of code.Its a question i got to answer from school.Here is the part of code
interface Interface1 { … }
interface Interface2 {…}
interface Interface3 extends Interface2{ … }
class Class1 implements Interface1 { … }
class Class2 implements Interface3 { … }
class Class3 extends Class2{ … }
Class1 a = new Class1(); Class2 b = new Class2(); Class3 c = new Class3();
Which of the following expressions is correct?
1. Class1 instanceof Interface2
2. Class2 instanceof Interface3
3. Class2 instanceof Interface2
4. Class3 instanceof Interface2
And if someone can explain me with some words witch one is correct and why? i would apriciate it very much thanks for your time mates!