Add String to beginning of String array

前端 未结 9 1079
孤独总比滥情好
孤独总比滥情好 2021-01-01 09:44

Is it possible to add a string to beginning of String array without iterating the entire array.

9条回答
  •  情书的邮戳
    2021-01-01 10:21

    You cant...You have to move all the strings coming after it forward to accommodate the new string. If you are directly adding it to 0th index, you will lose the previous element there

提交回复
热议问题