Can an abstract class in Java have methods that are not abstract?

  • No, all methods in an abstract class must be abstract.
  • Yes, but they must be marked as 'final'.
  • Yes, but they must be marked as 'private'.
  • Yes, they can be both abstract and concrete.
In Java, an abstract class can indeed have both abstract and concrete methods. Abstract methods are meant to be overridden by subclasses, while concrete methods provide default behavior. They can have any access modifier (public, private, protected, or default).
Add your answer
Loading...

Leave a comment

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