What is the random() method?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the random() method?
Rating:
The random() method is a static method of the java.lang.Math class. It takes no argument and returns a randomly generated number of type double. A number generated by the random() method is either greater than or equal to 0.0 and less than 1.0. In other words, this can be written as follows:
Rating:
Was this information helpful?
Other articles
- What are reference variables?
- What is the floatValue() method?
- What is the start() method?
- What is NoClassDefFoundError?
- What is the if-else statement?