This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes instanceOf & the  instanceof. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "instanceOf & the  instanceof." Watch "instanceOf & the  instanceof." New topic
Author

instanceOf & the instanceof.

thejaka samarakoon
Ranch Hand

Joined: Jul 20, 2010
Posts: 56
What is the difference with What is the difference with instanceOf & the instanceof.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Only one of them is a reserved Java keyword. Can you guess which one ?


[My Blog]
All roads lead to JavaRanch
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

thejaka samarakoon wrote:What is the difference with What is the difference with instanceOf & the instanceof.


Coincidentally, there is a similarity at the beginning of your question.

Try to compile a sample program with those words in order to understand the difference


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Sahil Kapoor
Ranch Hand

Joined: Sep 12, 2009
Posts: 316
Unfortunately method should be instanceOf but it is instanceof

Another method is mkDir() which is actually mkdir().



SCJP 6.0 96%

(Connecting the Dots ....)
Mahmoud Hossam
Ranch Hand

Joined: Feb 20, 2010
Posts: 74

Sahil Kapoor wrote:Unfortunately method should be instanceOf but it is instanceof

Another method is mkDir() which is actually mkdir().



instanceof is an operator,not a method

also,mkdir was named after the linux of the same name,which does the exact same job as this method,creating directories
 
 
subject: instanceOf & the instanceof.
 
Similar Threads
getClass and instanceOf
instanceof operator
java
isInstance
instanceof and isInstance