java - Loop to check a variable -
i want loop through array, want check see if element in arraylist bigger number.
for(int = 0; < newuser.getlist().size(); i++){ if(userage < 50){ system.print.out.ln(userage) } }
but im not sure on this, because don't know how use every element of arraylist part of if, not userage
if it's arraylist
can iterate without using counts etc:
for( int : mylist ){ if( > 50 ){ } }
Comments
Post a Comment