Java

Topic: Abstract Class and Interfaces

How to define an Interface?

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 SampleInterface {public void functionOne();public long CONSTANT_ONE = 1000;}

Browse random answers: