aspose file tools*
The moose likes Java in General and the fly likes Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java" Watch "Java" New topic
Author

Java

Abcd
Greenhorn

Joined: Jun 02, 2006
Posts: 3
why is Marker interface required?
Abcd
Greenhorn

Joined: Jun 02, 2006
Posts: 3
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Abcd
Welcome to JavaRanch!

We're pleased to have you here with us in the Servlets forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here
[ June 02, 2006: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Marker interfaces give us a way to specify and query an attribute of an object. For example, to see if an object would like to be serialized we can test whether it implements the Serializable interface.

Java 5 introduced annotations which provide a better way to specify such metadata attributes, so we shouldn't write new marker interfaces any more.


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
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14156
    
  19

Short, simple questions can often be answered in a few seconds by using an Internet search engine. Google for "java marker interface", for example, and you'll find lots of useful info:

The Purpose of the Marker Interface
Wikipedia: Marker interface pattern
etc.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41880
    
  63
The FAQ pages for this very forum have something to say about marker interfaces.

And please use a more descriptive topic subject next time - "Java" means nothing in a forum devoted exclusively to Java.


Ping & DNS - my free Android networking tools app
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Abcd just needs a last name. Maybe Snakes.

ABCD snakes?
LMNO snakes.
SMR snakes! CMEDBD eyes?
LIB! MR snakes!
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
Originally posted by Stan James:
Abcd just needs a last name. Maybe Snakes.

ABCD snakes?
LMNO snakes.
SMR snakes! CMEDBD eyes?
LIB! MR snakes!


LIB!

I stared at it, thought about it, scratched my head, thought some more, took a shot of Vodka, and drank two beers. Finally I got it. There's 20 minutes of my life I'll never get back. :roll:


Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java