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
Wha is the output from system.out.println(“hello”+null); ?
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
Can you sort a string in java?
What is meant by JVM? Is JVM platform independent or not?
Define "Access specifiers" in java.
What is the static variable?
What is arrays aslist in java?
What is adapter in java?
what are different ways in which a thread can enter the waiting state? : Java thread
What is the purpose of java?
When should I use singleton pattern?
What is the difference between class & object?
What are inbuilt functions in java?
What is the meaning of find and replace?
Can you have two constructors in java?