Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Strange "unchecked call" warning

843793Jul 27 2009 — edited Jul 28 2009
When I compile such code:
    HashMap props=new HashMap();
    props.put("A","B");
I get warning:

warning: [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.HashMap

Why?
HashMap has void type of elements. I should assign every type I want. Nothing seems to be wrong for me.

What am I missing?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2009
Added on Jul 27 2009
8 comments
1,783 views