Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Yasmeen Husam , Web Developer , Al Fahid Systems
Date Posted: 2019/01/31

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
by 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

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
by Mahmoud Sabbah , Senior 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
by ahmed elsaid , مساح لدي شركه بن سمار للمقاولات , شركه بن سمار للمقاولات

I do not knoooooooooooooooow

Nishcalen Chinappa
by Nishcalen Chinappa , Senior Financial Analyst , ABSA Formely Barclays Africa

Its an interface without a method in it.

Maruf Muhammad Shamsul
by 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
by 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
by 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.

More Questions Like This