Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sk.stuba.fei.Zadanie2cvikouloha1;
- import java.util.Scanner;
- import static sk.stuba.fei.Zadanie2cvikouloha1.MyDate.isValidDate;
- public class main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- System.out.println("Please write the range of dates in the format Day ");
- int day=in.nextInt();
- System.out.println("Month: ");
- int month=in.nextInt();
- System.out.println("Year: ");
- int year=in.nextInt();
- in.close();
- MyDate date = new MyDate(day, month ,year);
- if (isValidDate(day,month,year) == true) {System.out.println(date);}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement