How to return 1 attribute of an object in an ArrayList

I have an sorted arrayList that has the symbol and the closingPrice, now i just need to return the symbols from this arrayList, How do i do that?

please help, stuck here for quite a while now.

This is for module 2, i implemented the API, got the closing prices and sorted them in ascending order, can’t get how to return only the symbols from this sorted ArrayList

Take a look at the pojo class.
Then try using the getters provided in it

yup, but my arrayList can’t use the getters, only the Object arrays can do that i guess

There is a pojo class named totalreturnsdto which is already provided.
After fetching data from api, try storing required details in this class. And then maybe getter will make sense.

I hope this helps