阅读背景:

Scala---面向对象_shall潇の菜园

来源:互联网 

单例对象:object

object Oop1 {
  println("-------1-----")
  def showInfo():Unit={
    println("-------2-----")
    println("this is oop1 test")
  }
  println("-------3-----")
}

object TestOop1 {
  def main(args: Array[String]): Unit = {
    Oop1.showInfo()
  }
}
object Oop1 {
  println("-



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: