package com.simon; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class Study { public static void main(String[] args) { List<String> list = new ArrayList<String>(); String b = "abc,12,dad,dada";…
通过查看java.lang.Integer的源码可以发现, 它们最终调用的都是 /** * Parses the string argument as a signed integer in the radix * specified by the second argument. The characters in the string * must all be digits of the specified radix (as determined by * whether {@link…
1.int类型和String类型的相互转换 A.int -- String 推荐用: public static String valueOf(int i) 返回 int 参数的字符串表示形式. B.String -- int 推荐用: public static int parseInt(String s) 将字符串参数作为有符号的十进制整数进行解析 public class IntegerDemo { public static void main(String[] args) { // i…