When I run code in Eclipse or here in CodeGym everything works correct, but when I want to verify it, then CG displays an error.
package com.codegym.task.task09.task0922;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
/*
What's today's date?
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//Scanner sc = new Scanner(System.in);
String str = br.readLine();
try {
java.util.Date date = sdf.parse(str);
sdf = new SimpleDateFormat("MMM dd, yyyy");
System.out.println(sdf.format(date).toUpperCase());
} catch (ParseException e) {
System.out.println("Parse Exception");
}
}
}