public class Data
{
public static void main(String[] args) {
Map<String, String> data = new LinkedHashMap<String, String>();
data.put("1", "A");
data.put("2", "B");
data.put("3", "C");
data.put("4", "D");
}
}
I want to insert a new Element at position 2 and Move other element One step Down ? is it possible
Before
"1", "A"
"2", "B"
"3", "C"
"4", "D"
After
"1", "A"
"2", "New Element"
"3", "B"
"4", "C"
"5", "D"