hello there i have this arraylist (arr2) with the values 1, 2, 5 and 10 inside it. the problem is that i want to get each value out one at a time use i each one seperatly in my if statement (if (i%10 == ((Integer)arr2.get(arr2.size()-1)).intValue()) ) and then use the outcome in diffrent parts of my code. so for example i want to get the number 1 from the arraylist and then use the outcome in another part of my code and then do the same with the number 2. if anyone can help it would be great thanks ben
I'm not sure what you are asking here. In particular, what result do you want to use else where? And where do you want to use it? Your if statement is so complex that it will probably help if you broke it down.
hello layne well when i use the if statement it gets the number 1 from the arraylist (arr2) and that pulls out the 1, 11, 21, 31 words from the vector. which it does ok. but then i need to change the int value to value that is next in the arraylist (arr2), and so on with the next value from the arraylist untill i have used all the values from the arraylist. thanks ben
Joined: Dec 06, 2001
The code above looks a lot like the code in your question on the intermediate message board. I suggest that we focus on one issue at a time here. Let's just continue this discussion in that other thread. Regards, Layne