aspose file tools*
The moose likes Beginning Java and the fly likes coding problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

coding problem

fozia inam
Greenhorn

Joined: Nov 27, 2001
Posts: 4
hi,
could anybody tell me the coding for storing 20 unique random numbers in an array.
thanks
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This sounds like homework (there is an unofficial policy of not giving complete homework solutions)
You need to instatiate an array of integers large enough to hold 20 items
You need to loop through the list and put a new random integer in each slot (see java.util.Random.nextInt())
Dave.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
We don't want to rob you of an education by writing the solution for you. Show us what you have and tell us what's not working. Ask a specific question. Then we can help you.

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

this thread continued here.
Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: coding problem