• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

warining is coming while using Map why? code here

 
nagaraj raja
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are studying for SCJP 1.4 be sure to use the Java 1.4.2_* compiler.
Otherwise read up on generics.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic