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.

Answers were Sorted based on User's Feedback



Hey buddy.. can you please tell me about the use of marker interface? And is there any link between..

Answer / 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

Hey buddy.. can you please tell me about the use of marker interface? And is there any link between..

Answer / venkat

Marker Inferface doesnt consists any methods
it gives prior intemation to JVM to treat specially

Ex:Serialiazable
singleThread

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is final keyword in java?

0 Answers  


what is bytecode ?explain in detail and watz the difference between bytecode and machine code?

6 Answers   Lucent,


What is arrays fill in java?

0 Answers  


what is request dispatcher and how does it work?

2 Answers   CTS,


What does a za z0 9 mean?

0 Answers  






can you program for reverse string?

7 Answers   IBM,


Difference between Interface & Abstract class?

5 Answers  


Can arraylist hold different types java?

0 Answers  


How do you stop a thread in java?

0 Answers  


What access modifiers can be used for class ?

0 Answers  


What is java util?

0 Answers  


What is the right data type to represent a price in java?

0 Answers  


Categories