上一页 1 ··· 15 16 17 18 19
摘要: build.sbt: 运行结果: 阅读全文
posted @ 2017-06-24 20:42 AK47Sonic 阅读(1521) 评论(0) 推荐(0) 编辑
摘要: 运行结果: List colors has 3, List(red, green, blue)redList(green, blue)greenredgreenblueredgreenblueredgreenblueredgreenblueList(3, 5, 4)165true1122334455 阅读全文
posted @ 2017-06-24 17:14 AK47Sonic 阅读(249) 评论(0) 推荐(0) 编辑
摘要: class student{ def sayHello(name: => String){ println(s"Hello, $name, welcome $name") } } object FunctionDemo3 { def main(args: Array[String]): Unit = { val s = new student() def ... 阅读全文
posted @ 2017-06-24 10:53 AK47Sonic 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 class OldStudent extends Student { 2 3 def filterName(s: String, f: String => String) = { 4 if (s != null) f(s) else s 5 } 6 7 def mytrim(s: String) = s.trim() 8 9 def talkT... 阅读全文
posted @ 2017-06-23 17:39 AK47Sonic 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Hello 1, billHello 2, bill,20Hello 1, billHello 2, bill,20Talk to , bill,10Start to Jump 阅读全文
posted @ 2017-06-23 17:35 AK47Sonic 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 在sbt配置eclipse插件 C:\Users\Administrator\.sbt\0.13\ 新建plugins目录,在目录中新建plugins.sbt 文件内容为: addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % 阅读全文
posted @ 2017-06-22 21:16 AK47Sonic 阅读(1964) 评论(3) 推荐(0) 编辑
摘要: implicit 分为隐式转换和隐式参数,下面例子展现了两种方式的用法: 运行结果: 阅读全文
posted @ 2017-06-21 23:44 AK47Sonic 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 下载sbt: http://www.scala-sbt.org/download.html 解压zip文件F:\sbt-0.13.15 配置环境变量 如果需要可以修改F:\sbt-0.13.15\sbt\conf\sbtconfig.txt #ivy的cache等,保存到指定的文件夹;不配置的话sb 阅读全文
posted @ 2017-06-20 21:50 AK47Sonic 阅读(726) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19