Learn Java Programming - Instanceof Operator Tutorial

Опубликовано: 24 Январь 2016
на канале: Daniel Ross
1,437
14

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


На этой странице сайта вы можете посмотреть видео онлайн Learn Java Programming - Instanceof Operator Tutorial длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Daniel Ross 24 Январь 2016, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,437 раз и оно понравилось 14 зрителям. Приятного просмотра!