Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use Random and Scanner

807603Jan 17 2008 — edited Jan 18 2008
I have 2 fixed sized arrays, (one of type int, and another or type string) and I want to use the Random function to go through the arrays, and get a value at random, but I don't know the syntax to use.

The other thing I want to do is use a scanner to allow the user to pick values from both the arrays. What is the syntax I need for that also.

btw, I have already imported the random,array,and scanner class and I am using BlueJ.

thanks for reading

Edited by: needsomehelp on Jan 17, 2008 8:03 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2008
Added on Jan 17 2008
8 comments
649 views