You are here:   HomeJava ProgrammingIntroduction to JavaHow to compiling and running a Java program
by Dinesh Thakur Category: Introduction to Java

A java class containing all the methods as abstract is called an interface. A method that has no implementation and which is expected to be implemented by a subclass is called an abstract method.

Java interface can contain constants. When an interface needs to be instantiated it should be implemented by a class and all its abstract methods should be defined. If all the methods are not implemented in the class then it becomes a java abstract class and so cannot be instantiated. Variables declared in a java interface by default is final.

 



What's New and Popular