Java enhanced for loop

Data Structures JDK 1.5 Features

Data Structures JDK 1.5 Features Summary: This tutorial "Data Structures JDK 1.5 Features", narrates the new features added to DS with JDK 1.5 JDK 1.5 brought many changes in data structures. It not only added a new DS Queue but also added extra features to the existing collections framework. Evolution…

Collections Enhanced new for loop

This is the second tutorial on the enhanced for loop on collections. Earlier one is with arrays – Arrays Enhanced for loop (foreach). Collections Enhanced new for loop Observe the following program.

A generic ArrayList al1 that stores int values and al2 storing string values are created and elements…