You can extend a base Scala class and you can design an Inherited class in the same way you do it in Java by using extends keyword, but there are two restrictions: method Overriding requires the override keyword, and only the Primary constructor can pass parameters to the base Constructor.
Let us understand by the following example :
println("How to extend abstract class Parent and define a sub-class of Parent called Child")
class Child=(name:String)extends Parent(name){
override def printName:Unit= println(name)
}
object Child {
def apply(name:String):Parent={
new Child(name)
}
}