class Test {
//implicitly inherits type Object
}
class Quiz extends Test {
//explicitly inherits type Test
//implicitly inherits type Object
}
class PopQuiz extends Quiz {
//explicitly inheirts type Quiz
//implicitly inheirts type Test and Object
}
Object -> Test -> Quiz -> PopQuiz
instanceof
refers to the type of the instance. If an instance implicitly or explicitly "extends" a class, it is an instanceof that type, since it inherits the type of the class its extending (and any other classes that are extended upon, as seen in my hierarchy example).
PopQuiz is both a Quiz AND a Test. Therefore, an instance of PopQuiz inherits both types Quiz amd Test, so it is an instanceof Quiz AND Test.