How to insert Multiple values in Map Class ?


can any one please help me …

How to insert multiple values with single key in Map class(collection classes)


record is - 1001 Murali CSE

map.insert(“1001” , “Murali”);

map.insert(“1001”, “cse”);

it returns only recent inserted value … i,e 1001 cse …

How to fix this issue ?

You can have only one value for each key, but the value may be a composite object, e.g. an instance of Set class or another Map.