Are there any disadvantages (in terms of memory) for using Maps in Java?
Because as per my knowledge if you are using HashMaps or any other collections Classes .
For eg.
Map<String , String> map = new HashMap<String, String>();
map.put("id",1);
map.put("name","test123");
So I used 2 bites for each one of those let's assume. And according to me Map or any other collection hold 100 bites so remaining 98 bites are wasted. So, for that scenario, can I use anything else?