GMgKe586q6suSQnyqZLlGCooeWM
Learn To Program
Increase Your Knowlegde and Build Your Skill!
Pages
Home
Me
Search
Monday, December 27, 2010
Iterating Method In Java
For a given array, to iterate over the whole elements in the array, use:
String[] names = new String[]{"lady gaga","barack obama","larry page"};
for(String s: names){
System.out.println(s);
}
output:
lady gaga
barack obama
larry page
Iterating Method In Java
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment