what is marker interface ? what is the necessity of it?
Answers were Sorted based on User's Feedback
Answer / sandeep
An interface that contains no methods. Eg: Serializable,
Cloneable, SingleThreadModel etc. It is used to just mark
java classes that support certain capability.
Is This Answer Correct ? | 24 Yes | 3 No |
Answer / ganesh reddy
markble interface does not contains any methods,but
implementing of these interfaces will be recognise by Jvm
then it will decide that "this class is going do
something".for example for cloneable interface implements
by some class x which consists of a,b variable ,But I need
to interchange instance variables a to b and b to a (pass
by value)of class x and i want again the same values for a
and b.At this situations we can implement cloneable
interface.Like this markble interface are very useful as my
knowledge........
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / tulasi prasad
this is one type on null interface, it doesn't contain any
methods
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / prasanna sahu, munnekolal
Marker interface is an interface which gives a mark to the
runtime environment. This gives a mark that "I am going to
happen". It contains no methods.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / javaexp
<a
href="http://www.javaexperience.com/java-marker-interfaces/">Marker
interfaces in Java</a> are used for marking a specific
behavior and we can only simulate the behavior by writing
custom interfaces without any methods and having
implementing them by other classes.
Is This Answer Correct ? | 0 Yes | 0 No |
What is a dot notation?
How do you include a string in java?
what r advatages of websphere? & how to deploy?
what are the application of compiler and interpreter for source program
What is data type in java?
What is ctrl m character?
Is special character in java?
What are internal and external variables?
What is final method?
What is split return?
Name the method of a Container that can be used to cause a container to be laid out and redisplayed?
Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?