compile and get
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.base/java.util.ArrayList.rangeCheckForAdd(ArrayList.java:756)
Yes, this code throws an IndexOutOfBoundsException for begin to add elements at position 1 (and left without data the first element in position at index zero).
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ReachMo
3 months, 4 weeks agosupercoder
8 months, 3 weeks agopeteVln
9 months ago