why do we use interface in java?

Answer Posted / sandeep sagala

Interface is used to get an 100% abstract class. By using
this class we cant create an object for this class. In this
there will be all the unimplemented methods only. No method
is implemented in this type of classes. The methods present
inside this interfaces are all static and public by default.
The attributes present inside this interfaces are public,
final and static by default.

Is This Answer Correct ?    4 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the public method modifier?

546


Is arraylist ordered in java?

578


How do I get a substring?

529


What are the 2 types of java programs?

565


What are the differences between string, stringbuffer and stringbuilder?

528






List some important features of java 10 release?

517


What is the difference between a loader and a compiler?

527


What is the effect of keeping a constructor private?

473


What is the scope or life time of instance variables?

660


What's a method in programming?

551


When is update method called?

672


What are the default and parameterized constructors?

557


what is ststic with example

1599


How do you sort objects in java?

517


What is the use of java?

528