SyntaxFix
Write A Post
Hire A Developer
Questions
The method arrayList.size() returns the number of items in the list - so if the index is greater than or equal to the size(), it doesn't exist.
arrayList.size()
size()
if(index >= myList.size()){ //index not exists }else{ // index exists }