Holen Sie sich das letzte Element von Array Java
firstNum = numbers[0];
lastNum = numbers[numbers.length-1];
Stupid Seal
firstNum = numbers[0];
lastNum = numbers[numbers.length-1];
firstNum = numbers.get(0);
lastNum = numbers.get(numbers.size() - 1);