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!

Generify code

843793Mar 18 2005 — edited Mar 22 2005
If I cant change the signature of this method how do I refactor it so that it doesn't throw any compiler errors or warnings in JDK (1).5.0?

public void method(Object map, String key, String value) {
((Map) map).put(key, value);
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2005
Added on Mar 18 2005
8 comments
208 views