I'm trying to understand the syntax for inheriting one class from another and it seems I must announce the constructor parameters of the parent when I create the child?
Why does this code not compile?
class Animal(name:String)
class Dog extends Animal //Here is where compiler error occurs
But this does
class Animal(name:String)
class Dog(name:String ) extends Animal(name)
Is their a reason I must explicitly say extends Animal(name) and not just extends Animal and the constructor be implied?