learn java
The moose likes Java in General and the fly likes help with a statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "help with a statement" Watch "help with a statement" New topic

help with a statement

ben riches
Ranch Hand

Joined: Nov 08, 2002
Posts: 126
hello everyone i hope someone can help me
I have this code which prints out a line from the csv file but if you look at my code. Where it says if (i%10 == ((Integer)arr2.get(arr2.size()-1)).intValue())
this will read in the last item that is in the arraylist (arr2) by getting the integer value.
but i want it to read out all the values that are inside the arraylist arr2 how could i do this?
please could some one help me
Irene Loos
Ranch Hand

Joined: Apr 15, 2002
Posts: 78
Instead "-1" in your code:
if (i%10 == ((Integer)arr2.get(arr2.size()-1)).intValue())
use variable that you will increment/decrement to the size of your array.
Hope this will help.

Irene Loos
Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: help with a statement