Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

about Maps in java

Posted on 2009-05-20
3
Medium Priority
?
160 Views
Last Modified: 2013-11-23
why is it not possible to do the following in java
Map<String, int> myMap = new Map<String, int>();

Open in new window

0
Comment
Question by:bent27
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 24435425
Because in that context, int is still a primitive, despite autoboxing and collections can't contain primitives
0
 

Author Closing Comment

by:bent27
ID: 31583682
Thanks!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24435457
:-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question