posted 11 years ago
If you're using JDK 5 or later, you can take advantage of varargs - you don't need to explicitly create an array at all:
Since there are no Class arguments, the compiler inserts code to automatically create an empty array, just as you did.