get last list element java code example
Example 1: java last element in array
arrayName[arrayName.length() - 1];
Example 2: arraylist get last
E e = list.get(list.size() - 1);
arrayName[arrayName.length() - 1];
E e = list.get(list.size() - 1);