How to cast an array to an array with another primitive type
- by Martijn Courteaux
Hi,
Can someone complete the code on an easy way?
float[] floats = {...}; // create an array
// Now I want to create a new array of ints from the arrays floats
int[] ints = ????;
I know I can simply cast element by element to a new array. But is it possible on an easier way?
Thanks