Solved

about Maps in java

Posted on 2009-05-20
3
152 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
web application structure 18 135
How  can  i  resolve  HTTP Status 404 -? 8 78
How to determine if a string is a valid SHA value 7 57
Overriding a method 3 12
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

734 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