如果不需要访问内部类中的外部类,则可以执行以下 *** 作(如果声明了内部类,则在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)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)