-2

Here is my code, i want to get last object from arraylist to get and set it for PrintActivity, can i?enter image description here

  • 3
    post code not link (image) – KishanCS Jun 12 '17 at 09:30
  • There's some sites linked to on the https://stackoverflow.com/help/how-to-ask page if you want to include a minimal example of code. There's also a similar question here: https://stackoverflow.com/questions/687833/how-to-get-the-last-value-of-an-arraylist – Nelson Wright Jun 12 '17 at 09:42

1 Answers1

0
if(arrayList != null && !arrayList.isEmpty()){  
    arrayList.get(arrayList.size() - 1);
}
Mr_Perfect
  • 8,254
  • 11
  • 35
  • 62
Sanjay Hadiya
  • 864
  • 9
  • 21