字符串转int和Double

package test; public class JavaTest { public static void main(String[] args){ int myInt = Integer.parseInt("12"); System.out.println(myInt); Double myDouble = Double.parseDouble("12.23"); System.out.println(myDouble); } }

12 12.23

    推荐阅读