Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Java iteration through different sized arraylists

$
0
0
I need to iterate through 2 arraylists for collision purposes.

I have an arraylist named r which can be between the sizes 0-144, and an arraylist named lasers that is always 4.

How can I iterate through and check for collision without the IndexOutOfBoundsException?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>