The first thing that we need to understand is the definition of a supertype. A supertype is a class or interface that is higher up the inheritance hierarchy. The instanceof operator compares an object(instance) to the Name of a supertype and returns a boolean result. The instanceof operator will also return true if the instance is of the same class name.
(reference variable) instanceof (Name of supertype)
String s = "Hello World";
s instanceof Object; // true
Sur cette page du site, vous pouvez voir la vidéo en ligne Learn Java Programming - Instanceof Operator Tutorial durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Daniel Ross 24 janvier 2016, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,437 fois et il a aimé 14 téléspectateurs. Bon visionnage!