What are null interfaces in JAVA ? and give me some
examples?

Answer Posted / shailesh

Null interfaces are just the normal interfaces. But with
these, our classes will be having some additional
functionality. Like, clone() method is not defined in
Cloneable interface but we can make it available for our
class by letting it use cloneable(allowing my class to
clone the objects or just giving permission to do so).
So, these just be treated as a marker interfaces that marks
our class with additional functionality.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bufferedreader in java?

684


Explain about member inner classes?

703


What is independent and dependent variables in research?

549


When is the finalize() called? What is the purpose of finalization?

688


Outline the major features of java.

676






Explain different ways of creating a thread?

612


How can we find the actual size of an object on the heap?

927


Can this keyword be used to refer static members?

631


What is an 8 bit word?

690


What is difference between null and void?

634


Can memory leak happen java?

694


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

1992


What is a default constraint?

705


Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?

651


How do you remove duplicates from an array in java?

622