Generics / Integer to int
hello all, this is my first post. here's my code :
Iterator<Integer> i = list.iterator();
while( i.hasNext() ){
if( i.next() < intMethod() )
count++;
}
^Error: operator < cannot be applied toInteger,int
ok, my mistake, i tried this:
[...]
while( i.hasNext() ){
if( i.next().intValue() < intMethod() )
count++;
}
^Error: cannot find symbol
symbol: method intValue()
location: class java.lang.Object
why Integer earlier, and now Object.what'd i do wrong ?
thanks.
good day.

