ArrayList delay in return
In my application i have an ArrayList that is returned from another class,
and in the next line i need to get the size of it to create an another
array where i'm going to put some addresses, and it always return the size
0, in the debug mode i could see that more forward in the program the size
of the ArrayList is correct, but there all that i wanted to do is already
wrong, I have tried to use Thread.sleep(10000) and a 10000 blank loop, and
still nothing, please someone help, and sorry for my english, here it is a
little bit of the code:
caixas = campo.getCaixas(); //this is where i return the ArrayList
enderecosM = new byte[caixas.size()][2];
for (int j = 0; j < caixas.size(); j++) {
enderecosM[j][0]=0;
enderecosM[j][1]=0;
}
No comments:
Post a Comment