Except for a few examples, I don't see a section on the "Scala way" of doing IO. For example, if I want to process files and folders, should I just use Java classes? Or does Scala provide a more convenient way?
And speaking of convenience, is there any way to use C-style printf statements in Scala, as can be done in more recent versions of Java, e.g.
System.printf("%4d: %s\n", lineNum, line);
I've looked at Console.printf, but it's not a C-style print; I haven't yet figure out how to simulate this using Java's MessageFormat syntax.
You may know this already, but varargs in Java are just syntactic sugar for arrays. So the method signature <code>public Object doSomething(Integer... ints)</code> compiles to be the equivalent of <code>public Object doSomething(Integer[] ints)</code> Given that, I would imagine you could call varargs methods in Java classes just as you would ones taking arrays.
You may know this already, but varargs in Java are just syntactic sugar for arrays. So the method signature public Object doSomething(Integer... ints) compiles to be the equivalent of public Object doSomething(Integer[] ints). Given that, I would imagine you could call varargs methods from Scala just as you would ones that take arrays as parameters.