Java enhanced for/in

Hi all, How does the for/in works?!

I have the following small example i'm not understanding the structure:

// find minimum grade

publicint getMinimum()

{

// assume first element of grades array is smallest

int lowGrade = grades[ 0 ][ 0 ];

// loop through rows of grades array

for (int studentGrades[] : grades )

{

// loop through columns of current row

for (int grade : studentGrades )

{

// if grade less than lowGrade, assign it to lowGrade

if ( grade < lowGrade )

lowGrade = grade;

}// end inner for

}// end outer for

return lowGrade;// return lowest grade

}// end method getMinimum

My question is what do we use in it?

zeid

[1508 byte] By [zeid1a] at [2007-11-26 14:49:02]
# 1
http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#forloop
masijade.a at 2007-7-8 8:36:55 > top of Java-index,Java Essentials,Java Programming...