JAVA字符串转换整数

public class compint {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// int a = 70071234;
int a = Integer.parseInt("5");//将字符串转化成整形
String b = String.valueOf(123);//将整形转化为字符串
// if (a > 70072000){
//
// System.out.println("2库");
//
// }else{
// System.out.println("1库");
// }
System.out.println(a);



}

原文地址:https://www.cnblogs.com/51testing/p/8835215.html