What is mean by interface ?

What is mean by interface ?

You can think of interface as a fully abstract class.

 An abstract class can have abstract and non-abstract methods, but an interface can have only abstract methods ends with the semicolon.

 An interface may also contain constant.Example:public interface MyInterface{int i1;static int i2;static final int i3;void showi1();public void showi2();public abstract showi3();}


By:Jalees
Date:2012-01-09 00:00:00

You can think of interface as a fully abstract class.

 An abstract class can have abstract and non-abstract methods, but an interface can have only abstract methods ends with the semicolon.

 An interface may also contain constant.Example:public interface MyInterface{int i1;static int i2;static final int i3;void showi1();public void showi2();public abstract showi3();}


By:Sumit Tripathi
Date:2019-05-15 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher