File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
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