java last element in array

Java
arrayName[arrayName.length() - 1];firstNum = numbers[0];
lastNum = numbers[numbers.length-1];
Source

Also in Java: