import java.util.*; public class Scan { public static void main(String[] args) { Scanner scann = new Scanner(System.in); int i = scann.nextInt(); System.out.print(i); } } 我的jdk是1.6 测试通过
import java.io.*; public class Rea//方法2 { public static void main(String[]args)throws IOException { BufferedReader din=new BufferedReader(new InputStreamReader(System.in)); System.out.print("anInt:"); int anInt=Integer.parseInt(din.readLine()); System.out.println(anInt); }}
public class Test { public static void main(String[] args) throws IOException{ DataInputStream s = new DataInputStream(System.in); System.out.print(s.readLine()); } }
public class Scan {
public static void main(String[] args) {
Scanner scann = new Scanner(System.in);
int i = scann.nextInt();
System.out.print(i);
} } 我的jdk是1.6 测试通过
import java.io.*;
public class Rea//方法2
{
public static void main(String[]args)throws IOException
{
BufferedReader din=new BufferedReader(new InputStreamReader(System.in));
System.out.print("anInt:");
int anInt=Integer.parseInt(din.readLine());
System.out.println(anInt);
}}
public static void main(String[] args) throws IOException{
DataInputStream s = new DataInputStream(System.in);
System.out.print(s.readLine());
}
}
System.int.read()