Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Java random number generation

Share this post!
 Vote this!

This article demonstrates how to generate random numbers in Java. The code examples helps you to understand the details.

Step 1 - Generating random number in Java

Java random number generation
Generating a random number is a simple task using the Java built in Random class that is part of the java.util package. Using the Random class you can generate random Integer, Long, Float, Double, Boolean values. You need to create a new Random object first, and then you can use any if its nextInt(), nextFloat(), … methods.  more...

0 comments:

Post a Comment