In JavaScript, the following:
var a = [];
a[20] = "hello";
console.log(JSON.stringify(a));
would yield:
[null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,"hello"]
Is there a list type in Java that will auto expand when setting values beyond it's current bounds? A map isn't practical because I also need to know the array dimension.
xelements in the list, then you can't add another element on positionyify > x. In other words: if there are 5 elements in a list,list.add(10, "blub");will fail.