String <=> Integer conversion
2019-08-03 本文已影响0人
Leahlijuan
- String to Integer
int i = Integer.parseInt(s);
long l = Long.parseLong(s);
String.valueOf(int)
- Integer to String
Integer.toString(int)
int i = Integer.parseInt(s);
long l = Long.parseLong(s);
String.valueOf(int)
Integer.toString(int)