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 the difference between yielding and sleeping? : Java thread

525


Which package is imported by default?

638


What is predicate in java?

562


What are java annotations?

649


why using interface interface ?

1514






Can we have two main methods in a java class?

542


Explain the reason behind ending a program with a system.exit(0)?

602


What is the applet security manager, and what does it provide?

544


What is floor math?

521


What happens to the Exception object after handling an exception?

1818


What is thread pool? How can we create thread pool in java?

627


What is an off by one error in java?

506


What is command line argument

714


Can this keyword be used to refer static members?

551


What are invisible components?.

1681