Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 difference between next () and nextline () in java?

0 Answers  


What is an image buffer?

0 Answers  


Does a class inherit the constructor of its super class?if it does, how can you hide that constructor? if it doesnot how can you call it from the sub class?

2 Answers  


Can we compare two strings in java?

0 Answers  


What is the size of boolean variable?

0 Answers  






What is difference between path and classpath?

0 Answers  


Can we nested try statements in java?

0 Answers  


transaction attributes ?

2 Answers  


How many bytes is a url?

0 Answers  


How do you check if an arraylist is not empty?

0 Answers  


what is object type casting? give some example with related?

2 Answers   HP, SparkTG,


How can we handle runtime exceptions? write one sample program? Can we write runtime exceptions beside the throws key word? if yes write sample program?

1 Answers   Huawei,






Categories