Apache commons methods for generating random numbers in Java
New class is introduced in apache.commons for generating random numbers by calling a method. These methods can be accessed by importing
These methods can be accessed by
import org.apache.commons.lang.math.RandomUtils;
These methods can be accessed by
double rnddouble= RandomUtils.nextDouble();
float rndfloat= RandomUtils.nextFloat());
int rndfloat= RandomUtils.nextInt());
0 comments:
Post a Comment