0

I need something like:

Bill | 1
Bill | 2
Bill | 3
George | 4
Sue | 5
Sue | 6

and when I ask for Bill's values I get back 1, 2, 3

Thanks!

  • Looks to me like you should be using the Numbers as the Key and the names as the value... If you can't, then store an ArrayList or something similar for Value – ZeldaZach Jun 21 '17 at 20:10
  • 1
    Try a `Map>` or `Map`. – ack Jun 21 '17 at 20:10
  • If not all the items have the same type but are related, likely they can be modeled as a composing type, or holder. Example: `class Foo { Bar bar; Baz baz ; ...}` and `Map`. – Lew Bloch Jun 21 '17 at 20:27

0 Answers0