Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get last index of array java

int[] someArray = {1,2,3,4,5};
int first = someArray[0];
int last = someArray[someArray.length - 1];
System.out.println("First: " + first + "
" + "Last: " + last);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #index #array #java
ADD COMMENT
Topic
Name
8+2 =