Java tutorial
import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList<Integer> arrlist = new ArrayList<Integer>(5); arrlist.add(1); arrlist.add(2); arrlist.add(2); arrlist.add(2); System.out.println(arrlist); // change element to 55 at 3rd position arrlist.set(2, 55); System.out.println(arrlist); } }