Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xiongchiamiov
on Nov 29, 2010
|
parent
|
context
|
favorite
| on:
Groovy Array: it just keeps going...and going...
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
on Nov 30, 2010
|
next
[–]
Since Java 1.5, yes. Perhaps it's an issue of backwards compatibility.
xiongchiamiov
on Nov 30, 2010
|
prev
[–]
*without compiling
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: