permaculture playing cards
The moose likes Beginning Java and the fly likes diffrences between Random methods... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "diffrences between Random methods..." Watch "diffrences between Random methods..." New topic

diffrences between Random methods...

Josh Tambini

Joined: Nov 30, 2004
Posts: 24
what are the diffrences between the Random mathod that is in the Math.Random()
to the imported method from java.util.Random
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

java.util.Random has method to let you obtain random integers, doubles, and other data types, and exert a bit of control over how those numbers are generated.

Math.random() is just a simple convenience method that lets you get a series of random doubles. Its implementation uses java.util.Random internally.

[Jess in Action][AskingGoodQuestions]
Josh Tambini

Joined: Nov 30, 2004
Posts: 24
i see...10x!
the more conviniet thouh...(-: its static ..etc...
I agree. Here's the link:
subject: diffrences between Random methods...
It's not a secret anymore!