aspose file tools*
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
Author

diffrences between Random methods...

Josh Tambini
Greenhorn

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
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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
Greenhorn

Joined: Nov 30, 2004
Posts: 24
i see...10x!
the math.random...is more conviniet thouh...(-: its static ..etc...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diffrences between Random methods...