📌  相关文章
📜  java.lang.indexoutofboundsexception: index: 0, size: 0 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:16.378000             🧑  作者: Mango

代码示例1
The problem is that you are using set method to update element at index 0

set(index,value) method needs an element to present at that index

but you haven't added any element at that position in medium arraylist before that .

So you need to first add an element at index 0 thereafter only you can update it with set method