How we can create marker interface in java?

Showing Answers 1 - 15 of 15 Answers

Praveen Pulluru

  • Mar 16th, 2007
 

Hi there,
Creating an interface with no methods is called an marker interface, for example interface Serializable is an marker interface

  Was this answer useful?  Yes

Subhendu Patra

  • Jun 14th, 2007
 

E.g. I want to make an marker interface named Apple, and by implementing Apple interface the class will be serialized.. so please explain how to do that stuff.

  Was this answer useful?  Yes

sampra

  • Mar 11th, 2008
 

to inform to JVM that the objectedt created for particular class will be follw this property

  Was this answer useful?  Yes

trinadh

  • Mar 19th, 2008
 

we can create it by having no method defenitions on out own interface .

u first extend Serializable interface to ur Apple interface and after that what ever class implements ur Apple interface will be Serializable OK

  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