Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

last element array java

// Array of doubles
double[] array_doubles = {2.5, 6.2, 8.2, 4846.354, 9.6};

// First position
double firstNum = array_doubles[0]; // 2.5

// Last position
double lastNum = array_doubles[array_doubles.length - 1]; // 9.6
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #element #array #java
ADD COMMENT
Topic
Name
3+4 =