개발기록
[Java] 문자열->정수 형변환 본문
String -> Int
String from = "123";
int to = Integer.parseInt(from);
int to2 = Integer.valueOf(from)
Int -> String
int from = 123;
String to = Integer.toString(from);
Char -> Int
char from = '9';
int to = from - '0';
Int -> Char
int from = 9;
char to = (char)(from + '0');
'JAVA' 카테고리의 다른 글
[Spring Framework] Bean (0) | 2020.07.15 |
---|---|
[JDBC] Persistance Framework 관련 (0) | 2020.07.09 |
Webjar (0) | 2020.07.09 |
@Controller와 @RestController의 차이 (0) | 2020.07.09 |
[Java] 문자열 특정 패턴 추출/제거 (0) | 2020.03.24 |