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

15 lines
360 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 today = new Date(2023, 2, 23);
Date mariage = new Date(2023, 3, 1);
for (int i=0; i<10 ; i++){
System.out.print(today);
if (today.compare(mariage)){
System.out.print(" = Jour de mariage !!!");
}
System.out.println("");
today.lendemain();
}
}
}