how a marker interface gets its functionality and when we
implements a marker interface how it got invoked
Answer Posted / somasundar m
Marker interface are a design pattern which is used to mark
the classes for doing some specific actions. Marker
interface are just to mark the classes. For example
Serializable is a marker interface. So jvm looks for the
classes which are marked as serializable to serialize the
objects. It tells the compiler that the marked items
should be treated differently. Since it is a older design
pattern. Now a days Annotations has been introduced, so we
can replace the usage of marker interface with annotations.
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
Can final class have constructor?
What is the difference between object oriented programming language and object based programming language?
What is the finalize method do?
Difference between Linked list and Queue?
How will you invoke any external process in java?
Can private class be inherited in java?
When is the garbage collection used in Java?
how can you catch multiple exceptions in java?
What is dot operator?
What is singleton class and how can we make a class singleton?
What is loop in java?
How will you add panel to a frame?
How can you write a loop indefinitely in java programming?
can java object be locked down for exclusive use by a given thread? : Java thread
What are computer functions?