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

Answers were Sorted based on User's Feedback



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

Answer / unknown

marker interface is tagged interface with no methods inside
it.clone means copy of an object

Is This Answer Correct ?    47 Yes 12 No

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

Answer / samir

Marker interface is interface which doesn't have nay method
but still holds information..
Ex: Clonable

Is This Answer Correct ?    44 Yes 12 No

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

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

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

Answer / medha

marker interface is interface with no methods.marker
interfaces:
serializable,clonable,SingleThreadModel,EventListener
marker interfaces are called in order to add some
functionality to the calling classes.

Is This Answer Correct ?    16 Yes 2 No

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

Answer / ravikiran

Marker interface contains no methods.

Is This Answer Correct ?    21 Yes 8 No

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

Answer / tamilvendan

Marker interface is nothing but it do not have any method
but it will hold the information

Is This Answer Correct ?    16 Yes 8 No

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

Answer / ramesh.m

1)By implementing for interface,our object can get some
ability such type interfaces called as "marker/ability/tag
interfaces".

Ex:
By implementing Serializable interface,our objects can able
to travel across network and can able to save the file
persistently.

2)If any interface does not contain any methods, it is
always called "marker interface".

Ex:
Serializable ,Clonable,RandomAccess,SingleThreadModel.

in these cases,JVM will provide required ability
automatically.

3)Even though interface contains methods by implementing
that interface if our objects will get some ability still we
can consider it as marker interface.

Ex:
Comparable [compareTo()method],Runnable[run() method] etc.

in these cases,required ability should be provided by
programmer.

Is This Answer Correct ?    9 Yes 1 No

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

Answer / muruga

Hi

This is Muruga

Runnable Interface is an Marker Interface but it having
run() method, it reason for JVM will collect the system
properties at run time. Thats why we are called Runnable
Interface is an Marker Interface.


Friends you have some points means pl send to me.

Thanks and all

Muruga

Is This Answer Correct ?    20 Yes 15 No

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

Answer / alok kumar ranjan

Marker interface is tagged interface with no methods inside
it.clone means copy of an object.

The marker interfaces are used to provide certain
functionality to classes you code. Take for
instance the Cloneable interface. This interface is
implemented by the JVM itself and allows
copies of objects to be created without the developer having
to write code for this purpose.
User written marker interfaces can also be used for
inheritance purposes.Marker Interfaces are
used to mark the capability of a class as implementing a
specific interface at run-time.

Some examples of marker interfaces are :-
1) Serializable
2) Cloneable
3) RandomAccess
4) SingleThreadModel
5) EventListner

Is This Answer Correct ?    1 Yes 0 No

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

Answer / gaurav j

How can you serialize an object. The execution must be finished so that results can be serialized. But if execution is finished so will be data. Marking an object will tell jvm to hold data for specified operation and then mark it for garbage collection, just my thought. Please verify.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Explain how can you debug the Java code?

0 Answers   BirlaSoft,


What is a lock or purpose of locks in java?

0 Answers  


What is meant by bytecode?

0 Answers  


What is the benefit of abstract class?

0 Answers  


What are the different ways to handle exceptions?

0 Answers  






how many design pattern r there? and wht design pattern u use and why ?

5 Answers   HP,


Are registers volatile?

0 Answers  


When do you get classcastexception?

0 Answers  


What is the major difference between linkedlist and arraylist?

0 Answers  


What is data string?

0 Answers  


what are the differences between final,finally,finalize methods?

14 Answers   IBM,


What is array initialization in java?

0 Answers  


Categories