What are the different uses of Interfaces in Java ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. What are the different uses of Interfaces in Java ?Core Java
Ans. 1. Regulation / Enforcement / Policy / Contract , It's primary use

2. Use as a collection of utility methods(since java 8 through default methods)

3. Collecting constants together, As Interface are lighter, it makes sense to use them instead of classes if no getters and setters required.

4. Creation of Custom Annotations

5. Special services like marker interface

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     interfaces   uses of interfaces in java     Asked in 1 Companies


Related Questions

  Differences between abstract class and interface ?
 Why can't we have diamond problem with interfaces ?
  Why do we need Thread class even in case we execute thread using runnable interface ?
  What is the difference between List, Set and Map ?

or

What are the different Java Collections Interfaces ?
  What are Marker Interfaces ? Name few Java marker interfaces ?
  Can we declare interface methods as private ?
  What is comparator interface used for ?
  What is the use of runnable interface if we can always create a new thread using Thread class ?
  Which of the following doesn't extend Collection interface ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: