Question OOP-ABS-0016
HardCan an interface in Java have private methods?
- A.
Only abstract private methods
- B.
Only in Java 1.4
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Abstraction and Interfaces question
Can an interface in Java have private methods?
Only abstract private methods
Only in Java 1.4
Sign up free to see the answer and a step-by-step explanation.
No, never
Yes, since Java 9, to share code between default methods