Welcome to the Ranch.
Dean Hampson wrote:I've tried .get but it prints junk like this onto the screen: UserData@7f0c871e
The reason you get that does not have anything to do with how you are getting the UserData object from the list or how you are iterating the list. This is printed because your class UserData has no overridden toString() method.
When you print an object, like this:
the toString() method will be called on the UserData object, to convert it to text to be displayed on the console. If you don't specify a toString() method yourself in the class, the toString() method that class UserData inherits from class java.lang.Object is called, which prints something like "UserData@7f0c871e".
So, you have to implement your own toString() method in class UserData, which returns a
string that contains the content of the object in text form.