I have code below
public class LearnAboutMap {
public LearnAboutMap () {
Map<String, String> m = new Map<String, String>();
m.put('Type', '1');
m.put('Contact', '1');
m.put('Additional', '1');
m.put('Supper', '1');
m.put('Body', '1');
System.debug(m);
//Output: {Additional=1, Body=1, Contact=1, Supper=1, Type=1}
//Expected: {Type=1, Contact=1, Additional=1, Supper=1, Body=1}
}
}
Why Map in Apex is auto sort key ?