Adding only specific text from a file to an array list, part 2 - Java

前端 未结 2 885
名媛妹妹
名媛妹妹 2021-01-29 10:06

I hope I can have some great suggestion how I can solve this here:

I have this text file with places and names - name detail indicates the place(s) that the person has v

2条回答
  •  深忆病人
    2021-01-29 10:39

    Instead of having a Name class, how about a Traveler class that has String name and List places? You could then have a method add(Place p) on the Traveler class.

提交回复
热议问题