Java static class members and Scala interoperability
问题 From the An Overview of the Scala Programming Language, Second Edition : // Scala object PrintOptions { def main(args: Array[String]): Unit = { System.out.println("Options selected:") for (val arg <- args) if (arg.startsWith("-")) System.out.println(" " + arg.substring(1)) } } In the example above, the Scala program invokes methods startsWith and substring of String , which is a class defined in Java. It also accesses the static out field of the Java class System , and invokes its (overloaded