Certification Java SCJP

Java; the for-each loop, perfect for fondling collections and arrays

The for loop is great, but is it really that nice when you want to iterate over an array or collection? You’d have to do something like the following : Works fine doesn’t it? Looks a bit messy doesn’t it? No need for the index since we only ever use it to get the current […]