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

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

Utsav Sharma
من قبل Utsav Sharma

an interface which has no methods at all, they are just added to give some special features to a program, example cloneable interface, serializable interface

Daanish Rumani
من قبل Daanish Rumani , Product Manager , Publicis Sapient

A marker interface is one that does not have any methods.
It is used to mark classes and other interfaces to denote something.
Clonable and Serializable interfaces are examples.
So if a class implements a marker interface we say that the class has been marked with the marker interface.
Interfaces are also marked with a marker interface.
The documentation of the Serializable interface demonstrates this fact: http://docs.oracle.com/javase/1.4.2/docs/api/java/io/Serializable.html As you can see many interfaces such as Attribute, NamingContext, PrivatKey, ThreadPolicy, etc.
extend the Serializable interface.
This implicitly means that any class that implements any of these interfaces need to be Serializable.

Zakaria Alam
من قبل Zakaria Alam , Software Engineer , Wavelet Solution

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.
But as far as I know, it is depricated by annotation

It is one of Special kind of Interface it is BLANCK interface...

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

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