1.

How To Define An Interface?

Answer»

In Java, Interface defines the methods but does not IMPLEMENT them. Interface can INCLUDE constants. A class that implements the INTERFACES is bound to implement all the methods DEFINED in Interface.
Example of Interface:

public interface samplelnterface { public void functionOne(); public long CONSTANTJDNE = 1000; }

In Java, Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface.
Example of Interface:



Discussion

No Comment Found