public void delFirst() { //??????? } public void delLast() { if (!isEmpty()) { size--; } }
ArrayList<String> list = new ArrayList<String>(); int size = list.size(); int firstIndex = 0; int lastIndex = size - 1; list.remove(firstIndex); list.remove(lastIndex);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)