Can subclasses inherit concrete methods from an abstract superclass.
They >>do<< inherit them, unless they override them. (Apart from private
methods, which are never inherited or overridden in Java.)
Can subclasses override concrete methods from an abstract superclass.
Yes they can override them. (Apart from private
methods, which are never inherited or overridden in Java.) They don't have to though.
And secondly do they have to implement concrete methods the same way they implement abstract methods?
If you are asking if a subclass has to "implement" a concrete method that is defined in an abstract superclass:
No they do not have to, but they can, and if they do that is called overriding.
If you are asking if overriding a concrete method is the same as implementing an abstract method:
No, not completely the same. In an implementation of a abstract method, you typically cannot use super
to delegate the overridden method defined further up the superclass chain.
If you are asking if an override of a concrete method looks the same as an implementation of an abstract method:
Yes. The syntax is the same. (You just can't delegate using super
in the latter case; see above.)
Note: pretty much all of the above is also true when the subclass is also abstract; i.e. an abstract subclass of an abstract superclass.