BUT2/DEV/DEV2.1/TP04_Classes_et_objets/Q2_Date.java~

15 lines
380 B
Java
Raw Normal View History

2023-10-23 13:23:36 +02:00
public class Q2_Date {
public static void main(String[] args) {
Date jourRandom = new Date(2023, 2, 23);
Date mariage = new Date(2023, 3, 1);
for (int i=0; i<10 ; i++){
System.out.print(jourRandom);
if (jourRandom.compare(mariage)){
System.out.print(" = Jour de mariage !!!");
}
System.out.println("");
jourRandom.lendemain();
}
}
}