less than 1 minute read

문제

여기를 눌러 문제를 확인하세요.

코드

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		Date today = new Date();
	    SimpleDateFormat format1 = new SimpleDateFormat("YYYY-MM-dd");
	    String today_format = format1.format(today);
	    
	    System.out.println(today_format);
		
		sc.close();
	}

}