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

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

متابعة

Why there are some null interface in java ? What does it mean ? Give me some null interfaces in JAVA?

user-image
تم إضافة السؤال من قبل Yasmeen Husam , Web Developer , Al Fahid Systems
تاريخ النشر: 2019/01/31
Lucya Smit
من قبل Lucya Smit

To be honest, I think that you'd better turn to professional specialists with this task, because java development services seem to me to be a very difficult task. Have you heard about KindGeek? I think this is a pretty reliable company that pays special attention to each client and offers an individual work plan.

mohamed ayachi
من قبل mohamed ayachi , مهندس دولة في الإعلام الالي , المديرية الجهوية للجمارك ,Regional Directorate of Customs

Null interfaces act as markers.they just tell the compiler that the objects of this class need to be treated differently.some marker interfaces are : Serializable, Remote, Cloneable

Bilal Shameem
من قبل Bilal Shameem

Java provides null interface that mean interface without body initialization .These interface are called marker interface. Ans it is also a flag for JVM in java which provides some specialization.interface A {

 

}

Mahmoud Sabbah
من قبل Mahmoud Sabbah , Android developer , Oxygen

Null interfaces are act as makers ...they just tell the complier that the objects treated as a differently by JVM...Examples of null interfaces is serializable ,remote,Cloneable

ahmed elsaid
من قبل ahmed elsaid , مساح لدي شركه بن سمار للمقاولات , شركه بن سمار للمقاولات

I do not knoooooooooooooooow

Nishcalen Chinappa
من قبل Nishcalen Chinappa , Senior Financial Analyst , ABSA Formely Barclays Africa

Its an interface without a method in it.

Maruf Muhammad Shamsul
من قبل Maruf Muhammad Shamsul , Sr. Software Engineer , Ideascale Ltd

Another name of null interface is marker interface. In some marking is enough to give jvm or other packages to what to do with that class or object, like Serializable, Cloneable, etc. Some time it use just mark and handle with interface rather using actual class.

Shoaib Rehman
من قبل Shoaib Rehman , Big Data Engineer , Virtuosoft

Interfaces in java are a contract binding for any class that implements it, so for example an interface has a contract sayHello(), every implementing class has a binding to give it's implementation. This gives the concept of the great "Program to Interface".

Null interfaces in java are a special type of interfaces which help for some special treatment. They don't have any method declarations in them and are used for some kind of identification. Also called as Marker interfaces. Examples include Serializable, Cloneable.

Hope this helps.

Youssef Izikitne
من قبل Youssef Izikitne , R&D Engineer , Digimind

A null interface is an interface with no methods in it. But it's used to perform special tasks. For example, Serializable is a null interface; when a class implements this interface the JVM knows that its objects should be treated in a special way.

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