I\'m storing data in a HashMap with (key: String, value: ArrayList). The part I\'m having trouble with declares a new ArrayList \"current,\" searches the HashMap for the String
public static void main(String arg[])
{
HashMap> hashmap =
new HashMap>();
ArrayList arraylist = new ArrayList();
arraylist.add("Hello");
arraylist.add("World.");
hashmap.put("my key", arraylist);
arraylist = hashmap.get("not inserted");
System.out.println(arraylist);
arraylist = hashmap.get("my key");
System.out.println(arraylist);
}
null
[Hello, World.]
Works fine... maybe you find your mistake in my code.