What is Marker interface in java? and what is clone?

Answer Posted / ajay tiwari

Marker interfaces are those interface which may contain any
method but they provide some special information to the JVM
about what type of class or object it can be.

EX. Cloneable is a marker interface with no method which
means but it provide information to the JVM that class's
object who implement it can be cloned.

Runnable is also a marker interface with a run() method
which provide the information to the JVM that class's
object which implement this is used as a thread.

while the collection interface doesn't provide any special
information to the JVM that's why it is not as a Marker
interface

Is This Answer Correct ?    33 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is qms certification?

605


when to use ArrayList and when to use HashMap in webApplication.

4024


What is foreach loop in java?

629


Is set ordered in java?

653


What is static synchronization?

660






Can a string be null?

634


How to create a fecelet view?

659


What is the difference between jvm and jre? What is an interface?

639


What is linked hashmap and its features?

629


what are the high-level thread states? : Java thread

658


For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green  White will have 1 Weight.  Red and Green carry no weights.  Shortest path is the path with less weight when you add up the weights in the path.

1648


Tell me the latest versions in java related areas?

676


What is the symbol for average?

605


What do you mean by formatting?

630


How do you sort a string in java?

615