I've been working with HashMaps when I came to a question which I couldn't solve myself or find on the web.
HashMap<String,HashMap<String,String>> m= new HashMap<>();
HashMap<String,String> t = new HashMap<>();
t.put("test1","1");
m.put("h1",t);
t = new HashMap<>();
t.put("test2,"2");
m.put("h2",t);
System.out.println(m);
That gives me {h1={test1=1}, h2={test2=2}}
Thus the big HashMap contains data of both HashMaps. So the question is did it simply copy the data of smaller HashMaps, or do both "t" HashMaps stay in JVM memory, and HashMap m
simply links me to them?