我电脑装不鸟JDK1.5`一装就抱错`不知道是不是电脑配置差了`
装了个1.4的``勉强能用`
但是用1.4的时候`好象用不鸟Scanner类
我要是想编写Scanner input=new Scanner(System.in);
String s=input.next();
在1.4下用什么语句可以实现相同的功能呀`
装了个1.4的``勉强能用`
但是用1.4的时候`好象用不鸟Scanner类
我要是想编写Scanner input=new Scanner(System.in);
String s=input.next();
在1.4下用什么语句可以实现相同的功能呀`
String input = reader.readLine();
import java.io.BufferedReader;
import java.io.InputStreamReader;public class TestReader { public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = null;
try {
while ((s = br.readLine()) != null) {
System.out.println(s);
}
} catch (Exception e) {
e.printStackTrace();
}
}}