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

what is the difference between future and callable interface in java?

0 Answers  


Why does java have two ways to create child threads? Which way is better?

0 Answers  


What is the is a and has a relation ship in oops concept in java?

9 Answers   BearingPoint, TCS,


What sorting algorithm does javascript use?

0 Answers  


What are event-delegation model and event-inheritance model? Which is best?

1 Answers  






How do you compare two objects?

0 Answers  


How to re-get an object that is collected by garbage collector?

1 Answers  


What are the differences between c++ and java?

0 Answers  


what is default layout of JFrame class?

6 Answers  


How do you know if a value is nan?

0 Answers  


Is it possible for a yielded thread to get chance for its execution again?

0 Answers  


Is java a security risk?

0 Answers  


Categories