3 ms·
Can't you use variadic function parameters? public static Object[] createArray(Object... args) { return args; } I haven't done any Java in a w
by xiongchiamiov 16y ago
Can't you use variadic function parameters?
public static Object[] createArray(Object... args) {
return args;
}
I haven't done any Java in a while, so I'm just piecing this together from StackOverflow examples (with compiling, of course).
- Psyonic 16y agoSince Java 1.5, yes. Perhaps it's an issue of backwards compatibility.
- xiongchiamiov 16y ago*without compiling