Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public class Solution {
  2.  
  3. public static void main(String[] args) throws Exception {
  4. BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
  5. String s = r.readLine();
  6. DateFormat df = new SimpleDateFormat("yyyy-MM-dd",Locale.ENGLISH);
  7. Date datepars;
  8. datepars = df.parse(s);
  9. SimpleDateFormat df1 = new SimpleDateFormat("dd,yyyy",Locale.ENGLISH);
  10. SimpleDateFormat df2 = new SimpleDateFormat("MMM",Locale.ENGLISH);
  11. String s1 = df1.format(datepars);
  12. String s2 = df2.format(datepars);
  13. s2.toUpperCase();
  14. System.out.println(s2+" "+s1);
  15.  
  16.  
  17.  
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement