internal 模块内可见
成员默认是public
class House
class Flower
class Countyard{
private val house: House = House()
private val flower: Flower = Flower()
}
class ForbiddenCity{
internal val houses = arrayOf(House(), House())
val flowers = arrayOf(Flower(), Flower())
}
fun main(args: Array<String>) {
val countyard = Countyard()
val fc = ForbiddenCity()
println(fc.flowers)
}
当前内容版权归 JackChan1999 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 JackChan1999 .