Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

arrays in java

Name: Anonymous 2007-01-16 10:27

can someone tell me how to copy a 2 dimensional array to a 1 dimensional one? Ie.
array:
{2, 3, 5}
{4, 7, 9}
should become {2, 3, 5, 4, 7, 9}

Name: Anonymous 2007-01-16 14:12

In C-like languages arrays are always stored sequentially, the only thing that changes if the array has multiple dimensions is the manner in which the array is indexed. Therefore the need to flatten arrays at all is pretty strange I'd say. :/

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List