Random object

How can i get a random object from Array list?after searching , RandomAcees class can do this but still idon't see how, or is there better way for thisthx in advance
[187 byte] By [mike009a] at [2007-11-26 21:46:38]
# 1
Use java.util.Random.nextInt(int n) to get a random value between 0 and the size of the list - 1. Pass that value to List's get(int index) method.
jverda at 2007-7-10 3:36:17 > top of Java-index,Java Essentials,Java Programming...
# 2
thx jverdi will try it
mike009a at 2007-7-10 3:36:17 > top of Java-index,Java Essentials,Java Programming...