Below is the method add() of Java List Interface; if I loop through it 7 times adding i to the 0th position like so.
for (int i = 0; i < 7; i++) {
list.add(0, i);
}
Wouldn't it overwrite the value at that position, so I would end up with just one value of 6 in the list? Am I right, in assuming that?