Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

coding problem

 
fozia inam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi,
could anybody tell me the coding for storing 20 unique random numbers in an array.
thanks
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
this thread continued here.
Dave.
 
    Bookmark Topic Watch Topic
  • New Topic