first element arraylist code example
Example 1: java last element in array
arrayName[arrayName.length() - 1];
Example 2: java first index of an arraylist
ArrayList<Type> array = new ArrayList<Type>();
System.out.printLn(array[0]);
arrayName[arrayName.length() - 1];
ArrayList<Type> array = new ArrayList<Type>();
System.out.printLn(array[0]);