This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Marker Interface

 
Aby Ouseph
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is marker interface?What is the use of this type of interfaces?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 356
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic