212k views
3 votes
Can we have a non-abstract method inside interface?

1 Answer

3 votes

Final answer:

No, we cannot have a non-abstract method inside an interface in Java. An interface in Java is a collection of abstract methods that define a contract that a class can implement.

Step-by-step explanation:

No, we cannot have a non-abstract method inside an interface in Java.

An interface in Java is a collection of abstract methods that define a contract that a class can implement.

Therefore, all methods inside an interface are abstract by default, and we cannot define a non-abstract method.

User Lakhan
by
7.6k points

No related questions found