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 a null point?

0 Answers  


What is a stringbuffer?

0 Answers  


What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?

4 Answers  


What is singleton pattern?

0 Answers  


How do you start a new line in java?

0 Answers  






hr interview how many minutes asking question

0 Answers  


What restrictions are placed on method overloading?

0 Answers  


Which java collection does not allow null?

0 Answers  


What will happen to the exception object after exception handling?

0 Answers  


What is a arraylist in java?

0 Answers  


What are wrapped classes?

7 Answers   Samsung,


Explain about the security aspect of java?

0 Answers  


Categories