AScalableLanguage - cs.williams.edu
Scala cheat sheet (4): Traits Scala Trait trait T { def abstractMth(x: String): Int def concreteMth(x: String) = x + field var field = "!" } Scala mixin composition: class C extends Super with T Java Interface interface T { int abstractMth(String x) } (no concrete methods) (no fields) Java extension + implementation: