特牛网址导航

SCALA学习笔记(一)_scala static methods in interface require -target:-CSDN博客

网友收藏
文章浏览阅读2.9w次,点赞10次,收藏32次。变量获取变量的值是一个耗时的工作时,可以考虑使用lazy var. lazy val forLater = someTimeConsumingOperation()scala> val first :: rest = List(1, 2, 3) first: Int = 1 rest: List[Int] = List(2, 3)函数定义“=”并不只是_scala static methods in interface require -target:jvm-1.8