Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Marker Interface

 
Saravanakumar Gurusamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is use of an Marker Interface?
 
Rao Raghu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marker Interfaces dont have any body or methods to implement. They are just mentioned at the class name declaration. Mere mention of this adds a special functionality to the class.

Example: Serializable


 
Campbell Ritchie
Sheriff
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

More about marker interfaces, also called tagging interfaces on the Ranch here.
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I googled: "java marker interface"

http://www.devx.com/tips/Tip/5266
http://en.wikipedia.org/wiki/Marker_interface_pattern
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic