access java base class's static member in scala
问题 Ihave some codes written in Java. And for new classes I plan to write in Scala. I have a problem regarding accessing the protected static member of the base class. Here is the sample code: Java code: class Base{ protected static int count = 20; } scala code: class Derived extends Base{ println(count); } Any suggestion on this? How could I solve this without modifying the existing base class 回答1: This isn't possible in Scala. Since Scala has no notation of static you can't access protected