Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

wat is marker interface and it's use

 
anilellendula kumar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wat clarification on marker interface? i knew that marker interface is the an interface it doesnot have any methods, if it doesnot have any methods wat is the use of implementing this methods? as per basic java fundamentals , an interface is nothing but it has all abstract methods where u implementing an interface we need derive the methods?but wat about the case in marker interfce


Ex: serilizable interface...
 
Steve Simon Joseph Fernandez
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As the name suggests, a marker interface marks the class implementing it as having a particular property. For example, the Serializable marker interface - when a class implements it, this is a way of telling the JVM that this class can be serialized directly - there is no special processing to be done to serialize objects of this class.

_steve.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (Beginner).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic