| Author |
storing random no in Array...wiDout repetition
|
Muhammad Shahzad
Ranch Hand
Joined: Feb 17, 2002
Posts: 36
|
|
Hi, I wana store random numbers in an Array without repetition...pleade guide me how to do it.... I am using the logic given below, but it does'nt work.... Please let me know the correct logic. thanks [Dave added code tags] [ October 15, 2002: Message edited by: Dave Vick ]
|
 |
Ron Newman
Ranch Hand
Joined: Jun 06, 2002
Posts: 1056
|
|
|
Use a HashSet, not an array. You can later make an array from the Set if you need one.
|
Ron Newman - SCJP 1.2 (100%, 7 August 2002)
|
 |
 |
|
|
subject: storing random no in Array...wiDout repetition
|
|
|