Long与Integer之间的转换
Integer a = 10; Long b = a.longValue(); Long a = 10L; Integer b = a.intValue();
String与Integer之间的转换
int number = 10; String s2 = String.valueOf(number); String s = "100"; int x = Integer.parseInt(s);
String[]与String之间的转换
String a = "111,222,333,444"; String[] b = a.split(","); String[] a = new String[]{"111","222","333"}; String temp = Arrays.toString(a); //在执行此行代码的时候,会从第二个开始在每个元素前面加上空格,可参照Arrays.toString()方法,将空格replace掉即可。 String s = temp.substring(1,temp.length()-1);
标签:String,temp,数据类型,Long,互转,Integer From: https://www.cnblogs.com/min225016/p/16893109.html