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

What does singleton class mean?

984


What is string immutability?

1112


Is integer a class?

1089


What is a ternary operator in java?

984


What is arraylist e?

1087


How do you add an element to a set in java?

1038


Can set contain duplicates?

996


What are instance variables?

1081


Which of the classes will have more memory allocated?

977


What is arguments in java?

1008


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

1057


What are actual parameters?

1038


What are the 5 types of research methods?

1141


what do you mean by classloader in java?

1028


How do you implement polymorphism in our day to day life?

3233