摘要: import java.io._ //基类---Ponit class Point(val xc: Int, val yc: Int) { //属性 var x: Int = xc var y: Int = yc //方法 def move(dx: Int, dy: Int) { x = x + dx y = y + dy println ("x 的坐... 阅读全文
posted @ 2017-11-13 16:24 信方 阅读(313) 评论(0) 推荐(0) 编辑
摘要: import Array._ import scala.collection.mutable.Set object DataStructure { def main(args:Array[String]):Unit={ //数组 var z:Array[String] = new Array[String](3); var z1 = new Array[String](3);... 阅读全文
posted @ 2017-11-13 16:04 信方 阅读(5396) 评论(0) 推荐(0) 编辑
摘要: 参考:http://docs.scala-lang.org/cheatsheets/index.html、http://docs.scala-lang.org/、http://www.scala-lang.org/api/2.10.4/#package 1.关键字 空白字符。\u0020 | \u0 阅读全文
posted @ 2017-11-13 13:44 信方 阅读(654) 评论(0) 推荐(0) 编辑