ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is called marker interface? list out any three marker interfaces?

user-image
تم إضافة السؤال من قبل subramanyam guntakal
تاريخ النشر: 2013/07/23
M VISHAL  kumar
من قبل M VISHAL kumar

marker interface is a interface in java which has no fields or methods.in other words empty interface in java is known as marker interface.

there are some examples of marker interfaces are 

1 serializable 2. clonable 3. remote interface

1. java.io.Serializable (the object is serializable)

2.java.lang.Clonable (the object is cloned)

3.javax.servlet.singleThreadModel

kavya tg
من قبل kavya tg

Marker interface in java  is a kind of interface which has no method is known as marker interface. Serializable, Clonnable is the example of marker interface.

The three marker interface are,

1. MyMarkerInterface.java                (which is own created marker interface)2. ImplMarkerInterface.java              (A java class which implments my marker interface)3. FunctionalityMarkerInterface.java  (which help you to understand how the JVM do                                                                special operation for marker interface)

For coding part refer belo URL,

http://beyondcorner.com/create-own-marker-interface-in-java/

Zaheer Basha Gheewale
من قبل Zaheer Basha Gheewale , Electrical / ELV Engineer , Construction and Reconstruction Engineering Company

An interface without any body (empty body) is called a Marker Interface

Abhijeet Thool
من قبل Abhijeet Thool , IT Project Manager , US Confidentail Company

An interface is called a marker interface when it is provided as a handle by java interpreter to mark a class so that it can provide special behaviour to it at runtime and they do not have any method declarations.
Example: java.lang.Cloneable java.io.Serializable java.util.EventListener

Advaitha Chidurala
من قبل Advaitha Chidurala , Teacher , Little Masters Abacus

An interface which does not contain any methods is called a marker interface.

e.g:java.io.Cloneable

      java.io.Serializable

      java.io.EventListener

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟