Or What is a cloneable interface and how many methods does it contain? An Interface are implicitly abstract and public. Interfaces with empty bodies are called marker interfaces having certain property or behavior. Examples:java.lang.Cloneable,java.io.Serializable,java.util.EventListener. An interface body can contain constant declarations, method prototype declarations, nested class declarations, and nested interface declarations. Interfaces provide support for multiple inheritance in Java. A class that implements the interfaces is bound to implement all the methods defined in Interface. public long CONSTANT_ONE = 1000;
Example of Interface:
public interface sampleInterface {
public void functionOne();
}
Click Here to See Answer .....
Subscribe to my RSS feed and get more JAVA Question, and Guideline, Plus a lot more great advice to help your Software Career.
0 comments:
Post a Comment