String to Number, String to Wrapper class
String to Number 1. Using Integer.intValue() 2. Using Integer.parseInt() 3. Using Integer.valueOf()
String->Primitive
String->Wrapper class
byte b = Byte.parseByte("100");
short s = Short.parseShort("100");
int i = Integer.parseInt("100");
long l = Long.parseLong("100");
float f = Float.parseFloat("3.14");
double d = Double.parseDouble("3.14");
Byte b = Byte.valueOf("100");
Short s = Short.valueOf("100");
Integer i = Integer.valueOf("100");
Long l = Long.valueOf("100");
Float f = Float.valueOf("3.14");
Double d = Double.valueOf("3.14");
n진법의 문자열을 숫자로
Last updated
Was this helpful?