last element of java array without length code example Example: java last element in array arrayName[arrayName.length() - 1];