Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

about Maps in java

why is it not possible to do the following in java
Map<String, int> myMap = new Map<String, int>();

Open in new window

0
bent27
Asked:
bent27
  • 2
1 Solution
 
CEHJCommented:
Because in that context, int is still a primitive, despite autoboxing and collections can't contain primitives
0
 
bent27Author Commented:
Thanks!
0
 
CEHJCommented:
:-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now