int ---> String
1. 和 "" 进行拼接
2. 使用String类中的静态方法valueOf: public static String valueOf(int i) ;
String ---> int
1. Integer类中的方法: public static int parseInt(String s) ;
2.String-->Integer-->int
int ---> String
1. 和 "" 进行拼接
2. 使用String类中的静态方法valueOf: public static String valueOf(int i) ;
String ---> int
1. Integer类中的方法: public static int parseInt(String s) ;
2.String-->Integer-->int
int和String类型的相互转换实例: int b = Integer.parseInt("aaa");String d = String.valueOf(1+2+3);
将string转成数组再转成listString...
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M