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 better- service oriented or batch oriented solutions?
Can a class be defined inside an interface?
How to find the largest value from the given array.
What are dot operator queries?
What is ascii code?
Is null or empty java?
What is advantage of java?
Why singleton pattern is better than creating singleton class with static instance?
How do I enable java in safari?
How would you use Bubble Sort to sort the number of elements?
Why do we declare a class static?
How many threads can java run?
Is math class static in java?
What are the uses of synchronized keyword?
What is the difference between the paint() and repaint() methods in java programming?