如果不需要访问内部类中的外部类,则可以执行以下操作(如果声明了内部类,则在Java中是不需要的
static):
object A{ class B { val x = 3 }}class A { // implementation of class here}println(new A.B().x)
如果不需要访问内部类中的外部类,则可以执行以下操作(如果声明了内部类,则在Java中是不需要的
static):
object A{ class B { val x = 3 }}class A { // implementation of class here}println(new A.B().x)