You cannot use ResultSet as such in an enhanced for-loop as it expects an Iterable object or an array. This link will help you understand the enhanced for-loop better.
SCJP 5.0 and now fighting with ExtJS
Don't get me started about those stupid light bulbs.