Index 1, Size 1?
in
Programming Questions
•
2 years ago
- List<Item> PItems;
- Item[] HItems = new Item[10];
- int HCount = 0;
- for (HCount = 0; HCount < HItems.length; HCount++) {
- HItems[HCount] = PItems.get(HCount);
- }
What I wanted to do was to get the first 10 items from PItems and transfer them inside HItems
But the thing is that I keep getting IndexOutOfBoundsException: Index: 1, Size: 1 error
The loop is inside the draw function*
1