DEV_BUT1/DEV2.1/CTRLBLANC/Exo1/Aléatoire.java

12 lines
299 B
Java
Raw Normal View History

2023-04-04 14:03:16 +02:00
import java.lang.Math;
import java.util.Random;
public class Aléatoire{
public static void main(String[] args) {
double nb1;
nb1 = Math.random();
Random nb2 = new Random();
System.out.println("random propose : "+ nb1);
System.out.println("nextDouble propose : "+ nb2.nextDouble());
}
}