9 Replies - 477 Views - Last Post: 18 March 2009 - 08:53 PM Rate Topic: -----

#1 kathtaz_1315  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 09-March 09

random numbers

Post icon  Posted 18 March 2009 - 07:24 PM

how do I construct a random number from 0-9 with out any repetition??
Is This A Good Question/Topic? 0
  • +

Replies To: random numbers

#2 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: random numbers

Posted 18 March 2009 - 07:43 PM

You can use my class, NoRepeatRandom, to generate numbers without repeating.
Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: random numbers

Posted 18 March 2009 - 07:54 PM

View PostLocke, on 18 Mar, 2009 - 06:43 PM, said:

You can use my class, NoRepeatRandom, to generate numbers without repeating.

Or use the Loto Number generator I posted in the Code Snippet
just click on "My contribution" under my name

Locke, how come you don't reference MY piece of art ?
Was This Post Helpful? 0
  • +
  • -

#4 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: random numbers

Posted 18 March 2009 - 07:55 PM

Because I didn't know you had one. :P
Was This Post Helpful? 0
  • +
  • -

#5 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: random numbers

Posted 18 March 2009 - 08:04 PM

View PostLocke, on 18 Mar, 2009 - 06:55 PM, said:

Because I didn't know you had one. :P

T was fed up answering those loto unique numbers questions and showing up how to use an ArrayList and Random() pickup to do it so, I wrote that stuff that I put in the Snippet
Was This Post Helpful? 0
  • +
  • -

#6 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: random numbers

Posted 18 March 2009 - 08:08 PM

View Postpbl, on 18 Mar, 2009 - 08:54 PM, said:

Or use the Loto Number generator I posted in the Code Snippet
just click on "My contribution" under my name


Interesting implementation. I did it a bit differently in mine...a much less efficient way, I suppose. I was young and stupid. :D :P

Yeah...use pbl's snippet.
Was This Post Helpful? 0
  • +
  • -

#7 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: random numbers

Posted 18 March 2009 - 08:42 PM

View PostLocke, on 18 Mar, 2009 - 07:08 PM, said:

[Yeah...use pbl's snippet.

You are coming more mature :^:
Was This Post Helpful? 0
  • +
  • -

#8 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: random numbers

Posted 18 March 2009 - 08:44 PM

Heck...I know when I'm beat. -_- ;)
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: random numbers

Posted 18 March 2009 - 08:49 PM

View PostLocke, on 18 Mar, 2009 - 07:44 PM, said:

Heck...I know when I'm beat. -_- ;)

this is part of maturing :D :D :D
Was This Post Helpful? 0
  • +
  • -

#10 mostyfriedman  Icon User is offline

  • The Algorithmi
  • member icon

Reputation: 727
  • View blog
  • Posts: 4,473
  • Joined: 24-October 08

Re: random numbers

Posted 18 March 2009 - 08:53 PM

my snippets beat the crap out of both of your snippets :P :P jkjk...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1