Inner Classes in Scala and Java