What is interface and its use?

Answer Posted / harish

Interface is nothing but an unimplemented class. It
contains the method signatures. The method access
specifier may be abstract. The sub class should implement
all the methods, which are defined in the Interface. If
you don?t implement any method that class should be an
abstract class. Using Interface, It enforces the sub
classes to implement the same. So that, you can create an
instance of any sub class.

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is mena by object block any what is the use of that

1780


Explain hashset and its features?

596


What is int argc char * argv?

579


Can a singleton class be inherited?

542


What is a loop java?

594






What is java jit compilers?

572


Explain about the interpreter in java?

643


what is meant by Byte code concept in Java?

606


What is the += operator called?

590


What do you understand by private, protected and public?

533


What are the differences between abstract class and interface?

521


Break statement can be used as labels in java?

564


What do you understand by the term wrapper classes?

554


Which sort is best in java?

539


Can we override a variable in java?

565