BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String date = reader.readLine(); SimpleDateFormat s = new SimpleDateFormat("MM/dd/yyyy"); Date y = s.parse(date); SimpleDateFormat a = new SimpleDateFormat("MMM dd, yyyy", Locale.ENGLISH); System.out.println(a.format(y).toUpperCase());
Enter the date using the keyboard in the format “08/18/2013” Display this date in the form “AUG 18, 2013”.
Tell me why it doesn’t compile on the server? input and output: 12/25/1658 DEC 25, 1658
GO TO FULL VERSION