类的调用。

class inner{
private def fun(): Unit ={

println("我是内部类私有函数");

}
def fun2(): Unit ={

println("我是public 公共函数")
println("下面是我在公共函数里面调用同一个class类的私有函数。")
fun()

}
}

//类的调用
var inner=new inner();
//这两种方式都可以。
(new inner).fun2()