Hi Rayan Al-Hammami,
First of all, a warm welcome to CodeRanch!
Rayan Al-Hammami wrote:In the following code snippet, why does the Phone3 class not have implement the doIt() method from the Device interface? I thought an implementing class must provide concrete implementations for the interface's methods.
True (if the implementing class is not an
abstract class)! But as you already have figured out yourself: a class can implement the method either directly (implementation defined in the class itself) or indirectly (implementation defined in a class it extends from).
Hope it helps!
Kind regards,
Roel
PS. Have a
cow for searching this forum and answering your own question!