|
JDK 5.0 provides a special kind of for loop for access through all the elements of it.
Syntax
For(vaiable : collection){
Statements;
}
Example:
int[] a={1,2,3,4,5,6,7,8,9,0};
for(int i : a){
System.out.println(i);
}
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.