cannot resolve symbol symbol : method parseInt (java.io.InputStream) location: class java.lang.Integer int readint = Integer.parseInt(System.in); ^ 1 error这是怎么回事呢?
BufferedReader stdin = new BufferedReader( new InputStreamReader(System.in)); System.out.print("Enter a line:"); String value = stdin.readLine(); //得到一个从控制台输入的字符串 int iValue = Integer.parseInt(value); //把该字符串转换为int System.out.println(iValue);
symbol : method parseInt (java.io.InputStream)
location: class java.lang.Integer
int readint = Integer.parseInt(System.in);
^
1 error这是怎么回事呢?
参数是String类型的,System.in不是String类型的
new BufferedReader(
new InputStreamReader(System.in));
System.out.print("Enter a line:");
String value = stdin.readLine(); //得到一个从控制台输入的字符串
int iValue = Integer.parseInt(value); //把该字符串转换为int
System.out.println(iValue);
为什么c里这么简单呢