I am Ph.D. student in Computer Science at King Abdullah University of Science & Technology (KAUST).
JDK 5.0 provides a special kind of for loop for access through all the elements of it.
Syntax
Example:
int[] a={1,2,3,4,5,6,7,8,9,0}; for(int i : a){ System.out.println(i); }For more details: Java Tips
Post a Comment
No comments:
Post a Comment