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

How do you create a null object?

803


How many return statement are allowed in a function?

672


What is the maximum size of byte array in java?

786


What is a blocking method in Java?

852


What is adapter in java?

720


What are the rules for variable declaration?

719


What is the purpose of encapsulation?

757


What is the map interface in java programming?

794


What is the parse method in java?

811


Why is java not 100% pure oops?

835


What is finalize() function in java?

771


How can you write a loop indefinitely in java programming?

785


What is the largest long allowed by java?

803


Is age a discrete variable?

746


what is meant by HQL?

855