Variable arguments (varargs) were added in Java 5. Before that the format(..)
method you were trying to use was declared as
public PrintStream format(String format, Object[] args) {
In other words, it expected an array of objects. Since Java 5, the method is declared as
public PrintStream format(String format, Object... args) {
using the varargs syntax. You're probably using a compiler version lower than Java 5.