Logo

Programming-Idioms

History of Idiom 7 > diff from v6 to v7

Edit summary for version 7 by :

Version 6

2015-08-04, 16:38:34

Version 7

2015-08-05, 08:22:54

Idiom #7 Iterate over list indexes and values

Print each index i with its value x from an array-like collection items

Idiom #7 Iterate over list indexes and values

Print each index i with its value x from an array-like collection items

Code
for (final T t : list)
    System.out.println(t);
Comments bubble
Solution if the index is irrelevant.