I trying to understand the ArrayList
let say the user input in
1st Person
Name : Alex
Sex : M
Dog Name: Java
2 Person
Name: Joe
Sex: M
Dog Name: Is
3 Person
Name: Anna
Sex : F
Dog Name: Fun
in Arraylist how can you separate out from each person.
let say i only want to deal with Anna and her dog. how can i do it ? In other word, how can i know which dog belong to which owner. I dont want to display out like Alex dog name is Fun that is wrong!
Other thing is good to create an arraylist (if not, can you show an example code?)with asking user how many dog they have? and the name go long with it?