2007地图图示:java小问题
来源:百度文库 编辑:高考问答 时间:2024/05/30 20:46:41
java中 从键盘输入一个数字的代码是什么
代码如下:
import java.io.*;
public class Main
{
public static void main (String args[]) throws Exception
{
BufferedReader stdin =
new BufferedReader(
new InputStreamReader(System.in));
String line = stdin.readLine();
int a = Integer.parseInt(line);
System.out.println(a);//输出这个整数
}
}
类似的问题(同一行输入两个整数),详细请看:
http://zhidao.baidu.com/question/11043301.html