ajout vieux sujet
This commit is contained in:
BIN
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.class
Normal file
BIN
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.class
Normal file
Binary file not shown.
23
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.java
Normal file
23
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.java
Normal 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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user