Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the operands of instanceof operator?

Answer Posted / shaik baji

"instanceof" is a java keyword and it comes under binary
operators.

For "instanaceof" operator
the first operand is : any instance or object
the second operand is : any class name

For Ex:
-------

class Demo
{}
class InstanceofDemo
{
public static void main(String[] args)
{
Demo obj = new Demo();
if (obj instanceof Demo)
System.out.println("yes");
else
System.out.println("no");
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

942


What is a null class?

929


Should a main method be compulsorily declared in all java classes?

1006


Explain the difference between static and dynamic binding in java?

1028


Can we force garbage collector to run ?

1008


Are static members inherited to sub classes?

1098


Why is java multithreaded?

936


What is arrays fill in java?

954


Is void a keyword in java?

970


what is the difference between thread and runnable types? : Java thread

955


What are different ways of object creation in java ?

1026


What are different access specifiers in java?

956


describe method overloading

964


Is math class static in java?

1055


What does a boolean method return?

1160