All pastes #579694 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-20 19:55 UTC
rendered paste body
HashMap getAHashMap() {
    return new HashMap();
}

HashMap list = getAHashMap();
list.put("hi", 1);

//anyway to not get a warning with this pseudo snippet?

//here...
Type safety: The method put(Object, Object) belongs to the raw type 
 HashMap. References to generic type HashMap<K,V> should be 
 parameterized