returns the last element of the list or null if no list or items java code example Example: java last element in array arrayName[arrayName.length() - 1];