Example of show the following
|
Example code
|
Since, System.out.println(list + "\t"); is within the for loop, the loop prints out the array list member in sequence 1,; 1,2; 1,2,3; 1,2,3,4. If you put this line out side of the for loop the out put will be in linear like this " [Java, C#, XML, JSP]". Link |