
March 19th, 2002, 06:44 PM
|
|
Junior Member
|
|
Join Date: Nov 2001
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
ints in ArrayList
Hi,
I am retreiving some numbers from an HTML form, converting them to int and then storing them in an ArrayList.
I'm having trouble parsing the ArrayList to check if the numbers are less than 70. I can't cast the ArrayList datatype to an int for the purpose of comparing. I get a ClassCastException with this method, and any other things I try result in a "incompatible data type" complier error.
PHP Code:
for (int i = 0; i < scoreList.size(); i++) {
out.println(scoreList.get(i));
String score = scoreList.get(i);
int i_score = Integer.parseInt(score);
if (i_score < 70) {
out.println((String)scoreList.get(i));
out.println("insert some CA's");
}
edit: pay no attention to the "PHP:", it's java.. i promise.
Thanks
-jay
Any help is appreciated. Thanks
|