User Tools

Site Tools


java:instanceof

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
java:instanceof [2017/02/14 09:16]
gthanos
java:instanceof [2017/02/14 09:18]
gthanos
Line 39: Line 39:
     }     }
 } }
 +</code>
 +
 +Το παραπάνω πρόγραμμα εκτυπώνει
 +<code>
 +obj1 instanceof Parent: true
 +obj1 instanceof Child: false
 +obj1 instanceof MyInterface: false
 +obj2 instanceof Parent: true
 +obj2 instanceof Child: true
 +obj2 instanceof MyInterface: true
 </code> </code>
  
java/instanceof.txt · Last modified: 2020/02/25 09:33 (external edit)