Hello everyone,
I'm trying to learn
java by myself but I've been stuck in this code for too long.
I don't know if its just the printing part that is wrong, but if something in my other classes is also wrong.
The purpose of the code is to create a person, and print her/his data, including an ArrayList of hobbies. I'm currently struggling with the printing of the hobbies.
Here goes the code:
PERSON CLASS:
HOBBIES CLASS:
MAIN:
And the output is:
I know I've created a list in the Hobbies class that I think I'm not using at all. Its begging purpose was to also create a findHobby method, so the input would have to be on that list to be added but since I can't even print this right, I gave up on that.
I'm very new at this so please don't be mean, and I googled a lot in the past days to try and fix this but I couldn't.
~Thank you for your time