wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes warining is coming while using Map why? code here Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "warining is coming while using Map why? code here" Watch "warining is coming while using Map why? code here" New topic
Author

warining is coming while using Map why? code here

nagaraj raja
Ranch Hand

Joined: Aug 06, 2005
Posts: 36

reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
That's because those collections do not know what type parameters will be.

If you place <String, Double> behind Map and TreeMap, those warnings will disappear


SCJA, SCJP5.0, SCBCD, SCWCD
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
If you are studying for SCJP 1.4 be sure to use the Java 1.4.2_* compiler.
Otherwise read up on generics.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: warining is coming while using Map why? code here
 
Similar Threads
Gahhhr - stuck ...Generics? OOP-2
compiling under 1.5
What is the "standard way" when getting data from a DB?
HashMap dilemma
Trouble assigning enum keys to EnumMap in Java 5.0