Question: Write a method that returns the last element in the array. public int getLastElement(int[] arr) { }
Write a method that returns the last element in the array.
public int getLastElement(int[] arr) {
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
