Can you insert at position 0 in a List?

后端 未结 4 2015
醉话见心
醉话见心 2021-01-18 05:07

I need to insert an object at the beginning of a collection.

My colleciton is of type List

How can I do this?

4条回答
  •  Happy的楠姐
    2021-01-18 05:50

    Inserting an item at index 0 will place the inserted object at the beginning of the list and the other items will be shifted up by one.

提交回复
热议问题