한 하 함 해 행 표합
클 한 한 해
클 한 한 해
¶
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 (행할 )