Bookmark Topic Watch Topic
  • New Topic

Difference bn Marker Interface and InstanceOf Operator  RSS feed

 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Friends, what is the difference between marker interface and instanceOf in java
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Report post to moderator
No such thing as instanceOf in standard Java.

The keyword instanceof can be used to tell whether an object implements a particular marker interface (or any other interface).

Closing thread as too similar to this one; please continue discussion there. I hope you don't mind me closing a thread, Rob, Steve, Jesper.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!