• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What exactly is a Marker Interface?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most of the popular books on Java define Marker Interface as an Interface which has no menthods in it.

I know atleast two Marker Interfaces( eg. Runnable , java.lang. Comparable) which have a method in them.

What then is the exact definition of a Marker Interface?

Is the definition of Marker Interface in many of the popular books on Java misleading?

Please answer!!!
Thanks in advance.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not an advanced question. Moving...
 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I know atleast two Marker Interfaces( eg. Runnable , java.lang. Comparable) which have a method in them.



Wrong, Runnable and Comparable are not marker interfaces.

As I know marker interface is an interface with no methods in it. As Serializable, we don't implement any method when we implement the Serializable interface.

With Regards,
cmbhatt
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Answer in the FAQ:
http://faq.javaranch.com/view?JavaIntermediateFaq
reply
    Bookmark Topic Watch Topic
  • New Topic