108、Scala编程进阶之扩大内部类作用域的2种方法、内部类获取外部类引用-CSDN博客

网站介绍:文章浏览阅读1.2k次。内部类的作用域:外部类对象import scala.collection.mutable.ArrayBufferclass Class { class Student(val name: String) val students = new ArrayBuffer[Student] def register(name: String) = { new Studen..._scala 扩大变量的作用域