❮ Previous Next ❯

Java Instanceof operator:

Example:

name instanceof String Is true if the object person belongs to the class employee, otherwise it is false.

class InstanceDemo
{
public static void main(String args[])
{
String name="Tapuuu";
boolean x=name instanceof String;
System.out.println(x);
}
}
Output :

true

❮ Previous Next ❯

Follow Us





  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved