标签:package sys [] scan 复习 system.in rgs bsp util
获取键盘的输入
package Mypackage;
import java.util.Scanner;
public class Jc {
public static void main(String[] args){
Scanner scanner=new Scanner(System.in);
//System.in代表了标准输入就是键盘的输入
scanner.useDelimiter("\n");
//以回车符作为分格符
System.out.println("请您输入内容:");
while(scanner.hasNext()){
System.out.println("键盘的类容是:"+scanner.next());
System.out.println("请您输入内容:");
}
}
}
Runtime类代表了Java运行的时候的程序的运行环境,
标签:package sys [] scan 复习 system.in rgs bsp util
原文地址:http://www.cnblogs.com/llforeverlove/p/6350251.html