wood burning stoves 2.0
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Random Number from Math Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Random Number from Math" Watch "Random Number from Math" New topic

Random Number from Math

Ranch Hand

Joined: May 29, 2000
Posts: 45
Can the 'random' method of Math class return 0.0 and 1.0 ? I think, 0.0 is inclusive while 1.0 is NOT.
some one please confirm,
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Yes Shiny , that is what the documentation also says.To quote the Java2API
"Returns a random number greater than or equal to 0.0 and less than 1.0."

Joined: Jun 18, 2000
Posts: 15
I agree. Here's the link: http://aspose.com/file-tools
subject: Random Number from Math
It's not a secret anymore!