What is the difference between private and private[Class] declaration in
scala?
The class below compiles. How can I see the difference between those two
scopes if there is any?
class C1 {
private val p = 0
private[C1] val pClass = 1
def m1(other: C1) {
println(other.p)
println(other.pClass)
}
}
No comments:
Post a Comment