I know this for normal integers, but is there for such a thing as indices?
Random dice = new Random();
int n = dice.nextInt(6);
System.out.println(n);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What do you mean? Array indices are normal numbers, so you can easily do
Or do you mean a random Iterator class? Google is your friend here, this is the first hit I get.