Quantcast
Viewing all articles
Browse latest Browse all 30

Answer by Hank for In detail, how does the 'for each' loop work in Java?

Here's an equivalent expression.

for(Iterator<String> sit = someList.iterator(); sit.hasNext(); ) {    System.out.println(sit.next());}

Viewing all articles
Browse latest Browse all 30

Trending Articles