It's not a secret anymore!
The moose likes Java in General and the fly likes Marker interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Marker interface " Watch "Marker interface " New topic

Marker interface

eswar kumar
Ranch Hand

Joined: Oct 20, 2002
Posts: 98
what are the marker interfaces available in Java( except Single Thread Model,serializable)?what is the use marker interface?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
It's just a sign that you'd like an object to be treated some special way later. For example "Serializable" says if the JVM is serializing a bunch of objects this one would like to be included. Any objects that do not implement Serializable will be left out. Almost too simple to be true, no?

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
norman richards
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
I think you'll see marker interfaces fall out of favor when Java 1.5 comes out. Annotations (JSR 175 "metadata") captures this information in a much cleaner way. There isn't really much intro material on annotations yet, but keep your eyes open for it...
I agree. Here's the link:
subject: Marker interface
It's not a secret anymore!