Hey buddy.. can you please tell me about the use of marker
interface? And is there any link between marker interface
and factory methods?
Thanks in advance.
Answer Posted / namita
Marker Interface or sometimes called as Tagging interface
are empty interface which means it does not have any
methods. The use of the these interface is below
Like clonneable interface which is also a marker interface
when ur code implements clonneable interface the JVM will
come to know that you want to clone the object by calling
clone method(). Similalry serializable interface needs to
be implemented when you want to serialize the objects.
Their implementation is just to make aware the JVM.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Where and how can you use a private constructor?
What is xslt in java?
What is boolean flag in java?
Does java return by reference?
Difference between this() and super() in java ?
What do you mean by Function Overloading in java?
What is data member in java?
Can we create our own wrapper class in java?
Is it necessary for the port addresses to be unique? Explain with reason.
What are thread groups?
Who is the owner of java?
How do you calculate square roots?
Are maps ordered java?
What exceptions occur during serialization?
What is the definition of tree ?