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 is difference between hashset and hashmap in java?

937


Can array grow dynamically in java?

912


Why string is not a wrapper class?

1135


What restrictions are placed on method overloading in java programming?

1002


What is a linkedhashmap java?

947


What is getkey () in java?

958


What are peerless components in java programming?

959


Why hashset is used in java?

1000


What is the difference between a field variable and a local variable?

1025


What are the two types of java programming?

998


What is the basic of java?

972


Explain different states of a thread in java?

1003


Explain different ways of creating a thread. Which one would you prefer and why?

983


Define how can we find the actual size of an object on the heap?

1113


Can a string be null?

924