wood burning stoves 2.0*
The moose likes Java in General and the fly likes Null interfaces in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Null interfaces in Java" Watch "Null interfaces in Java" New topic
Author

Null interfaces in Java

deepika bhatia
Greenhorn

Joined: Jun 26, 2009
Posts: 10
Hi,
does anyone know what are null interfaces in java and what is its significance
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

Null interface is another name for marker interface. (I personally prefer marker)

Such an interface is empty, i.e. without any method declarations. Serializable interface is a classic example.
When any object implements Serializable, the JVM knows that it is supposed to treat it in a special way.

Google() for more information. This is a much discussed topic.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1447
    
    6

null interface is an interface that does not contain any method but is used to perform a special task. For e.g. Serializable interface, which does not have any method. But if we wish to serialize any class it must implement Serializable interface.


Swastik
deepika bhatia
Greenhorn

Joined: Jun 26, 2009
Posts: 10
maneesh and swastik thanks for replying
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Null interfaces in Java
 
Similar Threads
what are marker interfaces in java
Have You Used OFBiz or Something Else Together With the Struts Framework?
Is There Null Interface in Java?
here are some interview questions asked?any one kindly reply to these quesitons??
null interfaces