java arraylist remove first element code example
Example 1: java remove first element from array
String[] stringArray = {"foo", "bar", "baz"};
String[] modifiedArray = Arrays.copyOfRange(stringArray, 1, stringArray.length);
Example 2: remove first element of arraylist
ArrayList<Integer> myList = new ArrayList<>();
myList.add(1);
myList.add(2);
myList.add(3);
myList.remove(0);
System.out.println(myList); //2, 3