比如要输入一个整数赋给a 怎么写???
比如要输入一个整数赋给a 怎么写???
是啊,
import java.io.IOException;
public class test1 {
public static void main(String[] args) throws IOException {
int i = System.in.read();
}
}
import java.io.*;
public class test1 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
System.out.print(s);
}
}
这样可以
我试了
import java.io.*;
public class test1 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
System.out.print(s);
}
}
[此贴子已经被作者于2007-4-12 16:36:07编辑过]