What is Marker interface in java? and what is clone?
Answer Posted / alok kumar ranjan
Marker interface is tagged interface with no methods inside
it.clone means copy of an object.
The marker interfaces are used to provide certain
functionality to classes you code. Take for
instance the Cloneable interface. This interface is
implemented by the JVM itself and allows
copies of objects to be created without the developer having
to write code for this purpose.
User written marker interfaces can also be used for
inheritance purposes.Marker Interfaces are
used to mark the capability of a class as implementing a
specific interface at run-time.
Some examples of marker interfaces are :-
1) Serializable
2) Cloneable
3) RandomAccess
4) SingleThreadModel
5) EventListner
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain 5 io best practices?
What are the various access specifiers for java classes?
Is an object null?
What are exception handling keywords in java?
Is empty set an element of empty set?
What is parameters example?
what is the purpose of using rmisecuritymanager in rmi?
What is the generic class?
How do you create a bulleted list?
Explain about interthread communication and how it takes place in java?
What is unicode datatype?
How do you sort in descending order in java using collections sort?
What is pangram in java?
What is the purpose of a default constructor?
What is the difference between form & report?