Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. // TestDate is a driver for class Date
  4. public class TestDate
  5. {
  6. public static void main(String[] args)
  7. {
  8. String month;
  9. String day;
  10. String year;
  11.  
  12. PresentDate first = new PresentDate();
  13.  
  14. Scanner inData = new Scanner(System.in);
  15. System.out.println("Enter month:");
  16. month = inData.nextLine();
  17. System.out.println("Enter day:");
  18. day = inData.nextLine();
  19. System.out.println("Enter year:");
  20. year = inData.nextLine();
  21. System.out.print(month + "/" + day + "/" + year);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement