Concatinate integer arrays iteratively

Posted by Ojtwist on Stack Overflow See other posts from Stack Overflow or by Ojtwist
Published on 2012-11-18T10:45:22Z Indexed on 2012/11/18 11:00 UTC
Read the original article Hit count: 158

Filed under:
|

I have a methode in2.getImagesOneDim() which gives me an array of integers, to be more precise the pixel values of an image. Now i want to create one big array with all the pixel values of all the images. Therefore I have to call this method several times. Now I would like to concatenate the previous output to the current output until all images are read.

In some kind of pseudo code, where the + is a concatination ... :

 for (int i = 1; i < 25; i++) {
  ConArray = ConArray + in2.getImagesOneDim("../images/"+i);
 }

How would I do this in java ?

© Stack Overflow or respective owner

Related posts about java

Related posts about arrays