formatter
-
[JAVA] Formatter언어/JAVA 2022. 9. 8. 10:43
public class Formatter01 { public static void main(String[] args) { // 날짜 데이터 클래스, Calendar 와는 다름 Date today = new Date(); //java.util.Date System.out.println(today); // 날짜 서식 클래스 SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd"); // 날짜 데이터를 서식 데이터에 맞춰서 적용후 출력 System.out.println( sdf1.format( today ) ); // 날짜 서식 레퍼런스 변수들 SimpleDateFormat sdf2, sdf3, sdf4, sdf5, sdf6, sdf7, sdf8, sdf9; /..