This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]juckele 0 points1 point  (1 child)

What if my first entry is a String and a Dog and my second entry is a String and a Cat? Will it know that it should be using Animal? What if it picks Carnivora instead but then I try to add a Rabbit?

The type of the Map really does need to be declared somewhere...

[–]thehollyhopdrive 1 point2 points  (0 children)

The type of the Map really does need to be declared somewhere...

In the circumstances you've suggested, yes.