I have a ArrayList<MyDataType> pList; where MyDataType is a simple class like below:
class MyDataType {
int modified;
String name;
}
If my pList has size of 10 and if i want to retrieve ArrayList of names for all objects in it, how do I do that?
For example
ArrayList<String> myNames = new ArrayList<pList...>();
I want to know what the right hand side of the above statement should look like.