Choose a random entry from an array/arrayList?
in
Programming Questions
•
2 years ago
This seems like a simple thing, but it's been eluding me all day. How do I choose a random entry in an array or ArrayList? All of my solutions either end up producing values out of range or some elements in the ArrayList don't ever get picked (the first or last ones, sometimes). Does anyone know how?
1