answersLogoWhite

0

An interface is a collection of methods that must be implemented by the implementing class.

An interface defines a contract regarding what a class must do, without saying anything about how the class will do it.

Interface can contain declaration of methods and variables.

implementing class must define all the methods declared in the interface

If a class implements an interface and does not implement all the methods then class itself must be declared as abstract

Variables in interface automatically become static and final variableof the implementing class

Members of interface are implicitly public, so need not be declared as public.

An interface must be implemented in class.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Can you define variables in interface in java?

yes we can define a variable in an interface in java.


Can you create a constructor for an interface in java?

NO, we cannot create a contructor for an interface in java.


Is main a predefined function in java?

No. It is a user defined function which the person who is creating the java class has to code by himself.


What is intrface in java?

interface is a list of methods which implements that interface


What is a tagging interface type?

A tagging interface type in Java is an interface that has not defined methods such as the java.io.Serializable interface.


What java interface must be implemented by all threads?

Runnable interface


Can you create an empty interface with no definitions?

Yes. This is a valid interface definition in Java: interface Useless {}


What do mean by interface in java?

An interface in Java is like an abstract class, but there are no method bodies allowed in it and it has to be declared with the interface keyword. It is Java's way of getting around the Deadly Diamond of Death. Only abstract methods and constants are allowed in it.


What is interface in java?

Interface is collection of abstract methods which has only declaration and no implementation


What would interface java be used for?

Interface Java can be used for a variety of tasks and commands such as .swf files, Java files, running scripts, as well as website video players for websites.


Can you create an object of interface in java?

maybe


What are the different types of package in java?

1.user defined packages 2.predefined packages