String s = String.valueOf( value); // 其中 value 为任意一种数字类型。
String s = "169"; byte b = Byte.parseByte( s ); short t = Short.parseShort( s ); int i = Integer.parseInt( s ); long l = Long.parseLong( s ); Float f = Float.parseFloat( s ); Double d = Double.parseDouble( s );
Java string和各种格式互转 string转int int转string
原文:https://www.cnblogs.com/hkgov/p/11765172.html