• Post Reply Bookmark Topic Watch Topic
  • New Topic

marker interfaces  RSS feed

 
nagu datla
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the use of marker interfaces in java with out any methods
 
Keith Flo
Ranch Hand
Posts: 128
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They're useful for documenting what a class is supposed to be for. So think of it as a form of documentation. (This is a big part of the purpose of annotations in Java 5). Also, they are real types. So they become a real part of the inheritance tree.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!