초급의 끄적거림

[JAVA] String을 int로, int를 String으로 본문

JAVA

[JAVA] String을 int로, int를 String으로

codingD 2021. 8. 19. 17:51

String을 int로 (String to int)

String from = "123";
int to = Integer.parseInt(from);

 

int를 String으로 (int to String)

int from = 123;
String to = Integer.toString(from);
Comments