Interfaces in Java can have ________ methods from Java 8 onwards.

  • Both Abstract and Static Methods
  • Non-Static Methods
  • Only Abstract Methods
  • Only Static Methods
Starting from Java 8, interfaces in Java can have both abstract and static methods. This enhancement allows interfaces to have default method implementations using the 'default' keyword and static utility methods. However, they still cannot have instance variables.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *