my dog learned polymorphism
The moose likes Beginning Java and the fly likes null interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "null interfaces" Watch "null interfaces" New topic

null interfaces

feroz muhamed
Ranch Hand

Joined: Nov 15, 2003
Posts: 87
please help me to answer this question. which is from an interview .Why there are some null interfaces in Java? What
does it mean? Give some null interface in Java?
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

I've never heard the term "null interface" but I'm betting the interviewer meant "empty" or "tagging" interfaces, like or java.lang.Cloneable. Both of these interfaces declare no methods; by implementing them, a class signals some fact to the JVM (either it's OK to serialize it, or it's ok to clone it.)

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: null interfaces
It's not a secret anymore!