Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

instance of

The instanceof keyword checks whether an object
is an instance of a specific class or an interface.
The instanceof keyword compares the
instance with type. The return value
is either true or false .
Comment

instance of

if (cobj instanceof Child) 
	System.out.println("cobj is instance of Child"); 
else
	System.out.println("cobj is NOT instance of Child"); 
    
// Source: https://www.geeksforgeeks.org/java-instanceof-and-its-applications/
  
Comment

PREVIOUS NEXT
Code Example
Java :: java long data type 
Java :: java heap sort heapify geeks for geeks 
Java :: kotlin edittext default value 
Java :: horizontalAlignment center jlabel 
Java :: can the method local inner class object access method local variables 
Java :: sort a list in java according to last name 
Java :: java abstract modifier 
Java :: new in t arrray java 
Java :: hashmap put method 
Java :: mongodb spring boot index usage 0 
Java :: stringbuilder with delimiter java 
Java :: enhanced for loop arraylist 
Java :: android bottomnav fab 
Java :: java check if string appears twice in arraylist 
Java :: how to print each element of an arraylist on a new line in java 
Java :: the import junit cannot be resolved maven 
Java :: down casting java 
Java :: stringbuilder in java 
Java :: list interface java 
Java :: add random numbers to array 
Java :: How to launch app in your android mobile phone 
Java :: convert string array to string 
Java :: example of a for loop 
Java :: POST method) in spring rest api 
Java :: find subarray with given sum 
Java :: set array length java 
Java :: how to et curent directory in java 
Java :: stream reduce stringbuilder 
Java :: @embeddedid 
Java :: java cambiar formato de fecha 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =