Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

empty interface

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Why shall we use an empty interface(marker interface)?
Is there any specific use if there are no methods in the interface?

regards,
hari
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A marker interface is a interface with emplty methods/behavior. One of its purposes is to tag the classes implementing this interface. mainly this is used to group classes of the interface type.

In this case, any instances of the class are valid instances of interface.

refer to this link.
http://forum.java.sun.com/thread.jspa?threadID=608939&messageID=3330376
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this link useful

http://www.devx.com/tips/Tip/5266


Hope this helps!!!
 
    Bookmark Topic Watch Topic
  • New Topic