How to flatten 2D array to 1D array?

With Guava, you can use either

int[] all = Ints.concat(originalArray);

or

int[] all = Ints.concat(a, b, c);

Leave a Comment