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
What are the advantages of user defined functions?
What are different data structures in java?
What is the use of a conditional inclusion statement in Java ?
What is final keyword?
Can a method inside a interface be declared as final?
How does list work in java?
How thread scheduler schedule the task?
What is diamond operator in java?
How many types of gc are there in java?
Can we initialize the final blank variable?
Explain the init method?
Can we sort hashmap in java?
Why is it called a string?
How do you compare characters in java?
Does string isempty check for null?