Answer the question
In order to leave comments, you need to log in
Can an interface method have a body in Java?
I recently had an interview.
When asked what an interface is, I answered that "it is a collection of abstract classes that do not have a body."
To this they said that a method in the interface can have a body from some version of Java, but they don’t remember which one.
Is it so?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question