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
What is ascii code?
Can you override private or static method in java?
What is parsing a string?
What is the difference between numeric and integer?
hr interview how many minutes asking question
What is the different between get and post?
What is the difference between the file and randomaccessfile classes?
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
What happens if I remove static from main method?
What are data structures in java?
Can static methods be inherited?
Why convert an applet to an application?
Which software is used for java programming?
When is the garbage collection used in Java?
How do you sort arraylist in descending order?