网站介绍:文章浏览阅读1.5w次,点赞4次,收藏4次。在scala中有的时候用extends有的时候用with,到底该用什么呢? 请看下面用例 trait Mytrait1{ def doSomething(str:String):Unit={ println(s"$str is doing") } } trait Mytrait2{ def forfun():Unit_scala extends with
- 链接地址:https://blog.csdn.net/sinat_35045195/article/details/78772583
- 链接标题:scala中extends和with的使用_scala extends with-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:1593
- 网站标签:scala extends with