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 are the two types of java?

507


Explain 5 features introduced in jdk 1.7?

598


What is the scope or life time of instance variables?

644


How do you escape sequences in java?

582


What are the disadvantages of object oriented programming?

582






Difference between object and reference?

669


What is variable length arguments in java?

502


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

1719


How can we make a class virtual?

629


Explain about map interface in java?

581


What do you understand by private, protected and public?

510


What are "methods" and "fields"?

561


Which command from the jdk compiles a java program?

475


what do you mean by classloader?

539


What is Java Reflection API? Why it’s so important to have?

597