View RSS Feed

Advanced Java

Advanced Java programming.

  1. Java's Generic For Loop

    by , 02-18-2012 at 04:40 PM
    Generic consists of “new for loop”, that is known as “for each loop”. New for loop iterates the generic collections and also supports to integrate. Iteration over a List or Generic set is explained by this code:
    Generic List gets iterated by this code:

    Java Code: This is the code to explain the Generic For Loop
    List<String> list = new ArrayList<String>;
    for(String aString : list) {
    For loop parenthesis, declaration of a String variable is done. ...