Reputation: 1277
How can I declare an array of int in xtend?
I've tried ArrayList but I get the error "The primitive 'int' cannot be a type argument".
Upvotes: 6
Views: 5284
Reputation: 6729
Please refer to the docs for details, but essentially its something along these lines:
val int[] x = newIntArrayOfSize(5)
or if you want to define an array literal:
val int[] x = #[1, 2, 3]
Upvotes: 8