What is the actual purpose of marker interface when they doesn't have any methods.

Showing Answers 1 - 4 of 4 Answers

Nandakumar

  • Jul 25th, 2006
 

The actual purpose of marker interface is just to mark the respective class as specific to perform a respective job, like if you use serializable interface, it just makes a mark that this class can be serialized similarly if you use cloneable the class can be cloneable.... and these marker interface has no methods

  Was this answer useful?  Yes

puneet

  • Dec 23rd, 2006
 

the main purpose of marker interface is to check the instance of that class whick is going to implement by using instanceof()

method.but is reccomended

in programming code b'coz we know that why am doing it.

like-----we implement cloneable interface when use protected clone() method of Object class.in this case we know that i m going to create a copy of that object.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions