1import java.util.Random;
2public class Example {
3 public static void main(String[] args) {
4 Random rd = new Random(); // creating Random object
5 System.out.println(rd.nextFloat()); // displaying a random float value between 0.0 and 1.0
6 }
7}