HashMap of cats

  • 2
Here we've decided to make a collection of cats, so we're going to prepare a proper CATalog. In this program, someone has already gone to the trouble of writing a Cat class with a name field. Our task is to create a HashMap and add 10 cats to it. That's enough to start. As you probably already guessed, the cat's name should be used as the key.
You can't complete this task, because you're not signed in.
Comments(5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
oli blaustromLevel 14 , Luzern
21 December 2019, 18:30
Extremely weird. Foreach loop works but normal for loop doesn't.
Fadi AlsaidiLevel 15 , Carrollton, TX
21 November 2019, 00:43
What happen when a new object gets created with a reference to a variable name? for example from the task above: I can say New Cat cat1 = new Cat("Simba") or I can instantiated a new Cat in the map value with our assigning it to cat1 . How is the world would i know how to pull any new cat and I dot have its referenced variable? like if I wanted to pull the new Cat "Simba", how would i go about doing that when i don't have the Cat object reference like cat1? I hope that makes sense
Param MLevel 8 , Mumbai
11 July 2019, 11:56
Guys i have no idea how to procede with the code and use the put function in the code
senthamil selvanLevel 20 , Eral
25 January 2019, 05:11
help plz
RomanLevel 41
25 January 2019, 06:56
Please create a question in the "Help" section.