Solved

about Maps in java

Posted on 2009-05-20
3
147 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 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now