This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Marker Interface" Watch "Marker Interface" New topic
Author

Marker Interface

Aby Ouseph
Greenhorn

Joined: Dec 01, 2006
Posts: 10
What is marker interface?What is the use of this type of interfaces?
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

A marker interface is one that has no methods defined, such as java.io.Serializable.

These types of interfaces usually imply some type of a commitment on the part of the developer. Loosely stated, with Serializable, a commitment is made by the developer to use only the basic, standard, primitive data-types, or objects made up of them, and when using something that falls beyond that boundary, to mark it as being transient.

I hope I didn't just do your homework.

-Cameron McKenzie
Kai Witte
Ranch Hand

Joined: Jul 17, 2004
Posts: 356
hello,
Originally posted by Aby Ouseph:
What is the use of this type of interfaces?

I do not believe that they have any legitimate use.

See also "less fundamental implications" in my Design Principles.

Kai


Kai Witte's business website Kai Witte's private homepage
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
Welcome to JavaRanch.

That question gets asked so frequently that it has an entry in the JavaIntermediateFaq. You'll find the older discussions by searching through the forums.


Ping & DNS - my free Android networking tools app
 
wood burning stoves
 
subject: Marker Interface
 
Similar Threads
marker interface
what is mean by Marker interface?
Marker Interface
How can i write marker inerface
disadvantages of marker interface