Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Related problems of map in java!
Related problems of map in java!
Change int to Integer. That's because of generics, which means you can only put String-String name-value pairs in the map, and it's right not to add them.

Stored in the map is a name-value pair. The name is the index of the element, and the value can only be obtained by the name. Get (object key). Don't try to take out a and b at the same time. A and b have a mapping relationship. You should take A as the index of B.