why do we use interface in java?

Answer Posted / guest

Interface is a collection of abstract classes n
methods.Interface is mainly used for restricting the users
to make use of the specified methods only.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between hashset and hashmap in java?

468


FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?

2640


What is object cloning in Java?

636


Is call by reference possible in java?

538


What is n in java?

539






Explain throw keyword in java?

613


Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

655


what do you mean by classloader in java?

575


How use .contains in java?

624


What is a byte string?

625


What is the use of object and class classes?

569


What is Java Shutdown Hook?

611


What is downcasting?

576


What is object-oriented paradigm?

617


How is garbage collection controlled?

736