JAVA中int、String的类型转换

String字符串转int类型

   s="123";
  int i;
  第一种方法:i=Integer.parseInt(s);
  第二种方法:i=Integer.valueOf(s).intValue();

int类型转string字符串

  int i=123;
  String s="";
  第一种方法:s=i+"";
  第二种方法:s=String.valueOf(i);
原文地址:https://www.cnblogs.com/fulucky/p/7324272.html