If I have an array of doubles:
[10.2, 20, 11.1, 21, 31, 12, 22.5, 32, 42, 13.6, 23, 32, 43.3, 53, 14, 24, 34, 44, 54, 64, 15.1, 25, 35, 45, 55, 65.3, 75.4, 16, 26, 17.5,]
and I want to get the first element and last element so that
firstNum = 10.2
lastNum = 17.5
how would I do this?
question from:https://stackoverflow.com/questions/39860739/how-to-get-first-and-last-element-in-an-array-in-java