get last element of array java

Solutions on MaxInterview for get last element of array java by the best coders in the world

showing results for - "get last element of array java"
Vicente
20 Jul 2020
1firstNum = numbers[0];
2lastNum = numbers[numbers.length-1];
María Fernanda
22 Jun 2020
1
2arrayName[arrayName.length() - 1];
Emir
14 Apr 2016
1ArrayList<Integer> list = new ArrayList<Integer>(5); 
2int last = list.get(list.size() - 1); 
Johanna
13 Mar 2018
1int [] numbers = {1, 2, 3, 4, 5};
2
3firstElement = numbers[0];
4lastElement = numbers[numbers.length-1];
Ida
03 Feb 2020
1int[] someArray = {1,2,3,4,5};
2int first = someArray[0];
3int last = someArray[someArray.length - 1];
4System.out.println("First: " + first + "\n" + "Last: " + last);
Lorelei
20 Apr 2018
1int[] arr = new int[5]; //length of the array is 5
2int val = arr[arr.length - 1]; //here variable val stores the last element of arr
queries leading to this page
how to get the last object in arraylist javahow to get last item in arraylist javaaccess last element of arraylist in javacheck if you not at last element in an arry javacheck last element of index javaget last eelementy arraylist javajava get last elements of listhow to find last elemnt from list in javahow to find last element in array in javahow to get the last element of an array in jaavareturn last element of array javahow to get last object in arraylist javascriptfind last element in for loop javalast element in an arrya javajava array last positionget the index of the last element in javalast element of array java how to get the item of the last arrayin java scritlast element of an array in javaget position from last arraylistjava take ith element from back of listjava program to print index of the last element in an array java get last index of arrayget last arraylist element javafind second last elements in an array in javaarraylist last item index c 23print last element of int javahow to get the first element in an int javaget last element of list and then the restlast element of list in javahow to get the first element in an arraylisthow to return the last number in an array in javajava last index ofwhat is in the end of array index in javav 23 call first element in arraylistarray list get last elementjava last element in listhow to get last element of collection in java 8java how to get last arrayget last element of arraylistget first item from arraylist javcaget last element list javano print last item in list javaget last element in list kavaget last object arraylist javahow to get the last element in an array javahow to get the last element of an arraylist in javahow to get the last character of an array in a list javalast index of array list javajava collection get last elementhow to get the last element in an arraylist javascriptlast member of a list javahow to print last item of an arraylisthow to return the last element of an array on javalast item in a string array in javafind last indices match javajava get last element of list stringget second last element of list javajava get everything from an index to the last index of arraylisthow to get last index element in array listlast element of array listhow to return the last element of an arraylist javaget last version of array javadisplay 1st element in arraylist javajava get the last element of a arraylistfind last item in array javahow to access the last number in an array listread last indix in arraylistjava get arraylist from index to endaccces last elemtn of arry javahow to get the last element in array javaget last element from array in javaget last item from array javaarraylist get last in javajava how to get last element of listindex of first 26 last array elemnt in javafunction to get the last element of an array in javalast element in an array jaavjava how to access last element in arraylisthow to get last array javaarraylist get lastjava last position of arrayget first item in arraylistjava get last value of listlast index of array in javalast index element in an array javalastindexof for array in javaget last item from arraylist javareturn 5 last elements of arraylist javajava access last array elemntget first index of arraylist javaget first element of array javaget last element in a list javaget last item in arraylist javaget last in list javais the length of the array 1 the index of the last element of an array javaarraylist show last 4 elementsget first val of arraylist javahow to get last value from arraylist in javahow to access the last element of an array in javahow to get the last element of an arraylist javafind the last element of a list javajava last element of listjava list return last elementhow to access arrays first value in javaget last from list javajava get last element of a listget last index of element list javaget last item in list javahow to get the last entry in a list javaget alst element in array javajava how to get the last output of an arraylistlast item of a an array javajava program to find last index of an array elementhow to call the last array value in javahow to find the last element in the arraylist javaget last element string javajava last element arrayhow to access last index of array in javajava get last of arraycopy last element of array javaget last element of arraylist javascriptjava list 2c get last indexhow to get last element from arraylist javalast value in a list havalast element of array injavafind last element in array javajava get first element from arraylistarraylist get last element java 8get last element of list scalalast element of java array without lengthget list last itemget first value from array of stringlist get lastjava array get first index of valuearraylist how the get the first elementget last element java listif first array androidlast item in array javadivide arraylist by first and last index javaget last list javahow to get the last element of the list in javajava last item of arrayjava last index from arrayget list last element javahow to call the last item in a array javahow to find the last time something occurs in list in javajava get last item in string arrayget last 5 elements of arraylistnot print last item in list javajava last eementget last item in the list javahow to get last index in arraylist javalast element of the array javaarray last index key javalast elemnf of array listget last element of array in javahow to select the last element in the javajava get first element in arraylisthow to find first element in array in javahow to get last element from array in javaprint last element in array javajava list get lastget the last eleemnt of an arraylistprint the last element of an array in javahow to get last element in array javahow to get last element of list javajava arraylist first elementfor array last element javajava access last element of arrayget first 8 element of array javaaccessing last element in array javaget last element of array javatjava get last element of arraylistjava get the last element of a listget last element of array java without lengthhow to get the last element of an array in jaaget first list array of listsjavareturn last value in a java arraylistjava get last index value from listget index of last element in array javaarraylist last elejava get last of lischeking for the last element in a arraylist javaget index of last array in javalast element of arraylisthow to find the last element of list in javalast element of an array javaarray list show last 4 elementsjava list how to get last elementarray java how to use the last elementfind last item in the array java rxget last arraylist javaarraylist get last indexjava check is last element in listarraylist get last element javaget the last element of a list javacall the first and last in an array javaidentify the last element in list javaget last item from list javahow to get lastindexof in javahow to find the last element in an array in javajava get last index 5chow to get last int of array javaget last in arraylist javaget last element of string javajava last el of arraylast numeber in an array javahow to get the last value of an array in javahow to get last item in collection javaprint last array elemnt javajava arraylist get lastprint index of the last 1 present in the array in javahow to retrieve last element of an arraylist in javaget last item entered list javaget last index list javadon print last item in list javafind last index of element in list javaget the last webelement in a list javaget last element of a list javaget last element in java arrayjava code to get the last element of an arraychange possition of first and last element in list javause last indexof and lastindexof method in java arrayaccessing last value in list javajava get last element to end of arraylistlast elements of array javahow to get the last element in an array in javalast element in an array javaget last value in arraylist javahow to get last element of list in java 27how to dynamically pick last element from an array javahow to access last element of list in javajava array lasthow to find last number in array javahow to show last 10 items of an array list in androidarraylist how to get last elementis last element in list javahow to find last list in an arrayhow to get last elemnt of java arrayget last object in list javaarraylist get last elementhow to print last element of arraylist in javahow to excess last element from the list in javaget last element of set javalast element of an aray javalast index of for an array javajava last index of listjava last item listhow to get element of last item in array javajava get last element in listhow to get first element of arraylist in androidjava find last element in arrayfind last element of array javahow to print the first and last in list javajava get last item of arrayhow to get the value at last index in list in javaget last index of arraylist javajava return last array elementget last inex of an array jvaaget last item on list javaget last element in an array javahow to find last digit of array in javalast in array javaget the last element in an array list javahow to get the last value of a listindex of last element in array javajava access the last elementhow to find the last input in a arraylisthow to print the last element of an array in javajava list last elementjava last elements of arrayget last element of arraylsit javajava get first element of arrayhow to access last element in list javajava get the first element of an array inside an arrayhow to get last 5 index of array in javahow to get the last index in an arraylist javajava how to get the last element of an arrayhow to get the last element of a array in javajava program to find index of of an last element in an arrayget last array element javahow to get the first element in array listhow do i get the index of the last element in an array javaprint first element of arraylist java 22java 22 array get all but last elementhow to get last array value in javalast element in a list javahow to check if an item is the last item in a list javalast element in the list javajava get the last element of an arraylistjava get last element from collectionhow to add the last element to arraylist javahow to get latest value of array jaavahow to get last 2 element in java listget last elemt in list javaget the last of an array javahow to get last index in list java using streamjava array list how to get last elemntwhat is last index of in javaget the last index of an array javahow to get last element of string list javajava array lastgetting the last item of an array javasjava end of listrwrite a method called getlastelement that returns the last element of the given array in javalast item array javaget last element arraylisthow to get last value in array javafind last javawhat is after last element in the end of array in javajava get array first elementjava get last eleemnt of arrayhow to get the last value in a list javajava list get last indexacces last element of an array javalast element of a java arrayindexing last element in javahow to get first value of arraylist in javalist get last elementconsole last index of arrayjava arraylist print all but last elementjava lat array elementhow to get last element in list javahow to get the last elemnt in an array javahow to get the last item in a list javalist get last element java 8check last element of a array javaget last number on arraylistjava return first and last element of array of stringget last value in arraylistreturning the last elemnt of an array javastart from last array index javaaccessing last but not one element javajava array firstobtain the last element of a variable list javaget last element arraylist javajava print the only the last element of arrayhow to find the last value of an array in javahow to go to the last element in the array in javaarraylist first element indexhow to find the last element of an array in javaget last of list javaget the last value of the stack of javaaccess last element arraylist javacheck last element in list javaget the last element of array in javajava arraylist last itemhow to get an arraylist from the last element javaget last item in arraylistjava array getting the last arraylastindexof method for array in javaget last added node from arraylist javahow to find last element of array in javaget the last element of a list in javaget the last element of list javaget last from listget last element of an array in javafirst element of an arraylsitstring array last element javajava get last element of a rowhow to get last element of list in javaget last element of stack javajava array get the last elementhow to print the last object in a array in javalast element of a list javahow to grab the last element in an array javajava take i last item of arrayjava arraylist firstfind the last element in array in javalast index of for array in javascala get last n element of listget first element arraylisthow to get the last string in a arrayhow to get the last element of an array javahow to get last element in arraylistget an element from last javahow to access last element array in javaget last item in array javaandroid array verify is last itemjava get last 2 index from list of inthow to get list last element in javaarraylist get last item javajava list last indexhow to get the last value of a list javaget the last record on a array listjava get last element in arrayhow to find last index of arraylist in javafirst element of the arraylistget index of last element in list javaget an element from last array javaandroid java get last item in array listget last index from arraylist javaget last int in array javahow to find end element of array in javahow to get to the end of an arraylist in javafirst element of arraylist javajava get first of arraylistprint last element of array javaget last inddex of list javahow to get last object of the list in javagetting elements starting from 0 to last java arrayretrieve last element of list javaaccess first element in array list javaget last item arraylist javahow to get last index of arraylist in androidget last index of array javain string array how to find last and first index value in javafind the last element in for 28 3a 29 loop javahow to get last element of an array in javaend of list javaget last element list ajvahow to get the last element of an array in java listhow to get the last element of an array in a list javalast element in a string array javaget last item java arraylistjava get first array elementget the last object in javajava get last 10 elements of arrayhow to return the last value of an array ajvaarray last element in javajava how to get last element of an arrayhow to take last index element in javajava access last element in the listlast of list javaget the last element of an array javahow to access last element of array in javajava array last itemjava how to get last element of arrayget last element in arraylist javahow to get the last added object in a array listc 23 copy first and last element of arrayhow to get last element in arraylist javaarraylist get lasthow to get index of last elemnt in list javaarraylist last itemhow to get last element inserted in arraylist in javaget last list element javajava take 3 last item of arraycompar first item of list javaget last object of array javahow to retrieve the last element of an arraylist javastream filter java last element from listjava first element of arrayjava array last indexjava how to print the last content of a litsthow to get the last populated array index in javafind last element of array java using loophow to get last element of array in javashow to take last array in javajava get array last element previous 28 29 java arraylisthow to print off the last 10 elements in a long array javahow is the last element of an array represented in javahow to get the first element of arraylistlast 3 of array javaget the last value from array in jabv acheck if its a last record in arraylist javahow to get first element of an array in javamethod to access last element in arraylist in javaindex of the last element in an array javaget last index of arrayjavahow to get first element of arraylist in javaget last position in array javaget last element of array list javahow to get last index of substring javajava get list last elementhwo to get last element of array javafind last three value from array in javaget the last element in an arraylist javahow to return last value of an array javaget last element from list javajava get last n elements of arrayget last element javahow to check this is last elemtn of the list in javalast array index javafind last elemint in array javaget first element of arraylist javaget the last element of an arraylistget the last value of an array javaarraylist index of last element androiddetermine end of array java how to get the last element of a array javaget last value in array list javajava list lastget last row of list in javalast object in array listget last index of list javareturn last element of arraylist javajava set string array last elementhow to show arraylist data first array listget first element of string array javaindex of last element javagetting last element in javaget first and last element in list in javalast index method in javahow to print last item on fhe array listhow to get last element in array in javalist get first and last item java java lastarrayaccess last index of arraylist javaget last 10 object from an arraylist javallast element in array in javaarray last elemtn in javajava return last element of arrayhow to verify that the last element of a java list is reachedhow to access the last element in an arraylist javalast element in array javajava arraylist islastfind last index of element in array javalast element javajava array index last elementget last inidex of list javahiw to to find last element of array javahow to print last 3 element of an arraylist in javajava last element in arraywhat the last arry in javajava code to find last elements in an arrayget last elemnt of array javalast row in an array javaget the last element from list javaget the first element of a list of list in a list javaget last value arraylisthow to get latest value of arraylist jaavajava 8 list access last elementget last element in stack javaarraylist last elementget the last 3 items in arraylistget last item list 2bjavajva get last value of arrayhow to set item to last in jva listprint last element of string array javahow to get the first part of an arraylist in javahow to get last position of arraylist in androidlist last element javajava array last elementget last element in the arraylistjava get first index of value in arrayhow to get top element of arraylisthow to print last element of array in java loopget value at the last index list javareturn last value in a array javahow to get last element of a array in javahow to get last part of an array list string in javalast element index in arraylist javajava array last index of stringget the last element of arraylist javahow to get the last element of array in javaget last element of listjavaget last item in array listhow to find the last element in integer array in javaaccess last element of array javajava arraylist last elementfirst element of an array javajava list get last elementhow to print the last element of a list in javaget last element in array javaget last item of array in javajava get last list elementarraylist get first elementlast index of in java arraystackocer get last element of arrayjava int 5b 5d last elementlast value added in array javachange position of first and last element in list javaget the last element of an array in javahow to get last item of array in javashow to find last index in javajava program gets first element of arrayget last element of arraylsitlastindexof array javaget last element of arry in javaonly last item selected in list javalast position array javaarray index last element javahow to get last index in list javahow to get last item in list javalast element of java arrayarray list get first elementjava last element in an arrayhow to print last value of array in javajava get last element of listget first element in array javajava indexing last element of arrayjava get last element in a listget last in array listlast index element of array javalast index of javalast array of listfirst element array javaarraylist get last 10 elements java arraylist get last itemjava last element of an arrayget last item in a list javalast value of an array listjava arraylist get firstaray last element javasarray get last element javacall last value of array javajava list access last elementlast index in array javaget last arraylistarray is last item java for eacharray is last item javalast index in javajava how to get the last object in arraylast value of arraylistjava how to refer to last elemet in arrayhow to get the last position of an arraylistjava how to know if is last arrayelement of last row in arraylisthow to get last element in javaarraylist see the last valuepull the last number from an array javajava list get the last elementselect the last element of list javaget last member of arraylist javagert last element array in javahow to acces last element of a list javalast item in array is size 1 3fhow to get last intex of listhow to get first element of array in javahow to get the last element of an array in javalast element if arra lint in javahow to get last value from a array list in javajava get last element arraysearch last in javagetting the last variable of an array in javajava arraylist access last elementaccess to the last item of a list javalast value in array javalast element in arraylist javahow to the last index in javaget last 10 records arraylist javahow to accces last value in a arraylist in javajava how to find last element of arayjava list last 28 29get last listarray javaarray last index javalast index of array javafind last element in array in javaarray 0th element jvahow to get last item in array javaget first string of array androidhow to get the last part of a list javaprint all last n elements in list javahow to get last element from set in javafirst index and last index in java in arraylast element javajava list find last elementjava array print element at last indexgrab elements at the back of a list in java in javafind the first element in arrayjava last indexget last index in arraylist java and add new item after java get last from araylisthow to view the latest 5 elements in an array in javaget the last element of an arraylist javahow to get the last value of arraylist in javalast array in javahow to get last element in list for loop javahow to find last element value from list in javajava how to access a value to the last value in an arrayliststring last element in javcaprint the last element of a java listarray last n elements javafind the last array element in javahow to get the last 5 elements of array in javalast index of in javahow to check the last element in an arraylist javaget last pos in array javahow to get last elemtn of array in androidhow to get the last object from a list java androidjava list is last elementhow to get last index of array in javalast array element javajava get last item in arrayarraylist find last item indexget last object in arraylist javalast position used array javascala find last element in listlast index of arraylist javalast element in array in javaarray take last n elements javac 23 call first element in arraylistlist java how to use the last elementhow to find the last position of arrat in javaget last index from listlast item of list javahow to find last element of list in javalast index in an array javagetting last value in list javaget last item of arraylistjava array access last elementlast item in array in javahow to get the last index of an array javahow to find the last element of a list in javahow to pick the last value in an array javajava list stream get last elementhow to get last element of array in javahow can you access the last index of an array in javajava last index of arraylistmethod that gets last indexhow to get last element in a list javahow to get last item of array in javajava get last element of array java arraylist endget first element of double list javajava get last element of arrayget last element in list javacode last element in array javaacces last item in array javajava arraylist letztes elementget last element of array javaget last value of array javhow to get last elemnt values from list in javajava list getlasthow to get last thing in an array in javahow to get the last element in an arraylist javaarraylist get last jhavafind first array in array 2b javafind last element javaarraylist index of last elementindex first and last javalast element of list javahow to find the last index of a list in javacan you do lst 5b1 3a 5d in javajava get last enemy of arrayget last elemet of list javajava get last indexwhat 27s the last member of an array in javajava 11 get last element from listprinting the last value from array javaget last item of list javaget first element of the arraylist javajava vector last elementjava last index of arrayhow do you pick the last value in a list javahow to get last index javaget last element of arraylist javaget last item of array javahow to get last element of arraylsitget last position array javajava last int of arrayget the first item in an array javashow array elements from last to the firstjava get last array elementjava get last element arraylistlast element in list for each javahow to check the last part in a array javaarray list get lastlist get last element javajava get first element of arraylisthow to get the sum of the first and last value in an array in javalist get last index javahow to find the last element in an array javahow to get last array element in javareturn last index of array javais it possible to access last element of list in javajava get last index of araryget last value from array androidjava get last item in listarraylist java the last itemget last value in list javahow to get last element of arraylist javahow to find the last index position in a list javalast element in list javahow to invoke the last object in arraylistlast element of arraylist javaget first element array javaget last element form list javajava last index in arrayarraylist first element javajava array length last elementjava print last element of arrayget first element in array java wihout index valueget last value of array javahow to print last item on the list arrayhow to getthe last element of an arraylistget last element from array javawhy is my arraylist printing only the last elementscala get last element of listget last element of string array javajava get last element of a arrayjava last element in an listget last value of an arraylist javajava 2 last element of listfind last element in arraylist javajava arraylist last element indexget last element from a collection in javalist java get last elementlast index of list javajava arraylist get last added elementget the last item of an array in javaget last element in 22sectionlist 22 datahow to get last element of treeset in javacheck last element in list loop javajava array last entrylast array element in javaint array find last elementhow to get last element of a rray javajava return first and last elements of arrayinteger list to get last elementjava get last value in listlist getting the last element javalistjava how to get the last object in arrayjava get last object in an arraycompare last element with first elementarraylist last item androidget the first element form a array javaget last element of a set javajava string find last index oflast element array java how to get the first element of an array javajava program to find last index in an array elementfind last element in stream javahow to get last 3 elements of list in javaget last balance in a list javaget last element of vector javaget last index of list java 5cjava get last element of an arrayget last item i nlist javahow to return the last element in an array javafind the last element in an array in javahow to print first item in array javahow to get the last element of a list in javaget the last item of arraylist javahow to get the last thin in an array in javahow to get only last 10 items of an arraylist in androidreturns the last element of the list or null if no list or items java java arraylist print last elementloop to find last digit of array in javaget last 5 in an arrylist javahow to know last element in arraylisthow to get first element in arraylist javalast element of array javaprint out first element of an arrayliisthow to get last index of array in java androidhow to get the last element in arraylistget last element of array java without sizeget first index and last index in arrayget last element stringget the last three element of an array from n index javajava get last arraylist elementindex for last element of an array is called javajava get last element of the arrayjava get first item of arraylistlast index of any number javajava get last eltsimple java program to find last index of element in array javain list of string get last valueshow to return the last element in an array in javaprint the last item of an array javahow to get the last element in an arraylisthow to find the last number in an array in javaarraylist get last itemhow to find last element of arraylistjava array get last elementhow to get the last index of an array in javajava list how to get most recent oneget the last element in arraylist javajava 8 get last element of listget last index javahow to get last value of list in javalist last javacheck if first and last array int is samelast element of array list javajava the last element of an arrayjava get first of arraylist by key get array after first element javahow to get last element of arraylist in c 2b 2bhow to select last value in set in javajava collection get last itemjava arraylist last integerlast in arr javaarray last element javahow to find last object in array javajava get last index of listhow to get last index of arraylist in javaarraylist last element javajava get the last element of arraylast index e 2cpty cehck in javahow to find the last element of the arraylistgetting last element of an arraylist javahow to get last element of an array javaget last element of java listjava how to find last from streamhow to read the last value in javahow to find the last value in an array javajava list array get last indexjava find last element in listget final index in array javahow to get last element of array javalist last indexof javahow to store array data from last index to first in android studiohow to get the last element of an arrya in javalast seen array element in java arraylist java get last elementjava take first item from arraylast value in list java final element in an arraylist javaprinting 2nd last element from list javajava set get last elementjava string array get last elementhow to print last index value of array arraylist in javahow to return last value of a list in javaget element by last in list in javaget last element from collection javagetting firts and last element of arraylist in javajava get last index of arraylistlast element in arraylistjava return last item in arrayaccess last element of list javajava last item in listhow to know last index in set javafirst element arraylistjava get last elementhow do you access the last element in an array in javaadding first elemenet and last element in a list javatake n last item from array javaaccess last element of arraylist javafirst and last element in list in javajava int array index last elementhow to get the first element in arraylistloop to find last element of array in javahow to get last part of a list in javahow to acccess last element of array javaarraylist get last javalast lst javalast element of array javaslast element of array in javalast array value javafind the last element in the array javaget last element of array list in javahow to print last number from array arraylist in javajava get last item of int get lastest element in array javajava get last ellement of listget the last populated array index in javachecking if its a last record in arraylisthow to access the first element of an array in javaindex last of javahow to access last element in string list javaarraylist java last elementget first 4 stringarrya number in javajava get the last element of an arrayilist get last elementhow to get last value of arraylistlast item in an array javajava last array elementhow to get the last part of an arraylisthow to get a last element in javaarray 1 java last valuejava array last index offor each java list last objectprint first item of an arraylist java androidhow to print 2nd last element of an arraylist in javahow to get the last variable in an arraylist javalast element of an arraylist javajava array last element indexprinting the last value from arraylist 5c javajava get last indexes od stringget arraylist first element in javahow to get last element of arraylist in javawhat is the last elements filled in an array in javajava arraylist get last elementhow to print last element of array in javajava set to arraylist lastget last n elements from list javaarray change last element javahow to get the last variable in an array javalast element in list of class javaget last element of java arrayno print last item in list 22java 22last inserted element in arrayluist javaget the last element of array javaget the last element in list javajava how to find last number of arrayhow to get first of string array in javahow to get the last array valur in javaget the last index of an array in javalast value in array list javalast element in java arrayget the last value of an array in javahow to get last item from arraylist in javafinding last element in array javalast item in string array javajava get everything from an index to the last index of arraylast index javajava list last onejava get last object in listjava index up to last elementjava get last n elements of listhow to get first element of arraylist javaget last few indexes of aray javaget last element list 3cstring 3e javaint 5b 5d 5b 5d last element javaget last element of list javaget the last element from array list javajava set last value arraylistjava end of listjava check if element is the last item in the arrayliostlast element vector javascriptjs last of aray listhow to find the last index of an array in javahow to 2nd last element in list javastream java get last elemnt in all list in list of lists from listlist get all but last item arrayhow to find the last element of the arraylist in javaarraylist get last element o 281 29java array get lasthow to find last element in array javaget last element list filterjava last element of array java end of arrayjava get last item in arraylistget last element of array java streamlast elemant of array in javahow to say the last value of the array in javahow to get the last object in arraylistget last element in string javajava list get lastget last element of array jacahow to check the last value in a list javahow to take last element of array javalast index of liist javaonly writing the last object details javafind the first element in array in javaget the last element of a list string javaget last object of arraylistget first allement of array javajava list lastget the latest item of list in javaget last element of array java