ajout vieux sujet

This commit is contained in:
2024-03-10 16:28:28 +01:00
parent edc92ac142
commit 42bb92022a
7 changed files with 59 additions and 9 deletions

View File

@@ -0,0 +1,23 @@
import java.lang.Math;
import java.util.Random;
public class EXO1{
private double valeur1;
private Random random;
private double valeur2;
public EXO1(){
valeur1 = Math.random();
this.random = new Random();
valeur2 = random.nextDouble();
}
public String toString(){
return ""+valeur1+"\n"+valeur2;
}
public static void main(String[] args){
EXO1 test = new EXO1();
System.out.println(test.toString());
}
}