Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. package sk.stuba.fei.Zadanie2cvikouloha1;
  2. import java.util.Scanner;
  3.  
  4. import static sk.stuba.fei.Zadanie2cvikouloha1.MyDate.isValidDate;
  5.  
  6. public class main {
  7.  
  8. public static void main(String[] args) {
  9. Scanner in = new Scanner(System.in);
  10. System.out.println("Please write the range of dates in the format Day ");
  11. int day=in.nextInt();
  12. System.out.println("Month: ");
  13. int month=in.nextInt();
  14. System.out.println("Year: ");
  15. int year=in.nextInt();
  16. in.close();
  17. MyDate date = new MyDate(day, month ,year);
  18.  
  19. if (isValidDate(day,month,year) == true) {System.out.println(date);}
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement