Trait can be inherited.
If you use the extends keyword to inherit multiple traits, use with connection.
If the class has both a parent class and a trait, inheritance is still used, but extends is the parent class, with the connection trait
Scala traits (similar to interfaces in Java)
Guess you like
Origin blog.csdn.net/a772304419/article/details/105556800
Ranking