![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
scala
乔尼娜沙德星
这个作者很懒,什么都没留下…
展开
-
在scala中使用break和continue的功能
在scala中是没有java中的break和continue这两个关键字的。但是有相应的函数来实现功能。break:import scala.util.control.Breaksobject BreakDemo { def main(args: Array[String]): Unit = { val arr:Array[Int] = Array(11,222,33,4...原创 2019-07-26 11:08:14 · 318 阅读 · 0 评论 -
scala中的 OOP(面向对象编程)
-1.class类 和Java中类是一样的-2.Object对象 类比 和Java单例对象 main方法运行在此处-3.trait 类比 Java中接口Interface隐式转换implicit implicit 隐式的,隐藏的 偷偷摸摸 关键词: 修饰class,修饰def,修饰变量,...原创 2019-07-28 21:00:24 · 247 阅读 · 0 评论