Organizational Research By

Surprising Reserch Topic

Question:What is a cloneable interface and how many methods does it contain?



asked Sep 13, 2013 in Core java by rajesh
edited Sep 12, 2013
0 votes
68 views



Related Hot Questions

2 Answers

0 votes

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.

Example of Interface:

public interface sampleInterface {

public void functionOne();

public long CONSTANT_ONE = 1000;
}

answered Sep 13, 2013 by rajesh
edited Sep 12, 2013
0 votes

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.

Example of Interface:

public interface sampleInterface {

public void functionOne();

public long CONSTANT_ONE = 1000;
}

answered Sep 13, 2013 by rajesh
edited Sep 12, 2013

...