게 거 고 게
간
간
¶
Date Calendar
Date ¶
~cpp Date today = new Date(); // today Date객 System.out.println(today); // today String
~cpp
SimpleDateFormat dateForm = new SimpleDateFormat("yyyy MM dd hh mm ss"); //
System.out.println(dateForm.format(today)); // today Date객 dateForm 게
| y | |
| M | |
| d | |
| h | (1~12) |
| H | (0~23) |
| m | |
| s | |
| S | 1/1000 |
| E | |
| a | / |
Calendar ¶
~cpp Calendar now = Calendar.getInstance(); // 객 고 int hour = now.get(Calendar.HOUR); // 간 기 int min = now.get(Calendar.MINUTE); // 기
Calendar
| YEAR | |
| MONTH | |
| DATE | |
| HOUR | (1~12) |
| HOUROFDAY | (0~23) |
| MINUTE | |
| SECOND | |
| MILLISECOND | 1/1000 |
| DAYOFWEEK | |
| AMPM | / |
(Random) ¶
~cpp Random r = new Random(); int num = r.nextInt(); // Int(-2147483648 ~ 214783647) int num2 = r.nextInt() % 10; // -9 ~ 9 구기 int num3 = Math.abs(r.nextInt() % 10); // 0 ~ 9 구기. Math.abs() 값 구
과 ¶
과
~cpp 2003 9 27 :-97% 감:43% :-99% 각:-96%
고
,감,,각 값 -100 ~ 100 값 ( )
,감,,각 값 -100 ~ 100 값 ( )










