标签:http 类的构造函数 技术分享 app cal alt const 函数 blog
Trait多继承顺序:
准则:
object TraitOrder extends App { trait Logger { println("Logger") } trait FileLogger extends Logger { println("FileLogger") } trait Closable { println("Closable") } class Person{ println("Constructing Person...") } class Student extends Person with FileLogger with Closable { println("Constructing Student ...") } new Student }
运行结果:
标签:http 类的构造函数 技术分享 app cal alt const 函数 blog
原文地址:http://www.cnblogs.com/AK47Sonic/p/8016441.html