Java 实现从控制台接受输入Scanner类
import java.util.Scanner;
public class Input{
/**
* @param args
* author:wrh 2012.04.09
*/
public static void main(String[] args) {
System.out.println("请输入内容:");
Scanner sc = new Scanner(System.in);
String input = sc.next();
int a = sc.nextInt();
}
}
跟我走啊~~