Java get the first element in the list

www.laut‮irut‬.com
Java get the first element in the list
/**
 * @author lautturi.com
 * Java example: get the first element of the list in java
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		List<Integer> al = new ArrayList<Integer>();
		for (int i = 1; i < 10; i++) {
			al.add(i);
		}

		System.out.println(al.get(0));
	}
}
Created Time:2017-09-06 22:06:02  Author:lautturi