aspose file tools
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 Head First Android 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
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
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.
 
Don't get me started about those stupid light bulbs.
 
subject: Marker Interface
 
It's not a secret anymore!