SHARE
TWEET

sss

a guest Feb 14th, 2020 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.codegym.task.task09.task0922;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.InputStreamReader;
  5. import java.text.SimpleDateFormat;
  6. import java.util.Date;
  7. import java.util.Locale;
  8.  
  9. /*
  10. What's today's date?
  11.  
  12. */
  13.  
  14. public class Solution {
  15.  
  16.     public static void main(String[] args) throws Exception {
  17.  
  18.         BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
  19.         SimpleDateFormat ymd = new SimpleDateFormat("yyyy-MM-dd");
  20.         SimpleDateFormat mdy = new SimpleDateFormat("MMM dd, yyyy",Locale.ENGLISH);
  21.  
  22.         String s = r.readLine();
  23.         Date date  = ymd.parse(s);
  24.         System.out.println(mdy.format(date).toUpperCase());
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top