题解 | #牛牛学说话之-整数#
牛牛学说话之-整数
http://www.nowcoder.com/practice/df9ee533ef9544bfa382203c812d9b55
import java.util.Scanner;
public class Main{
public static void main(String[]args){
Scanner in = new Scanner(System.in);
int a = in.nextInt();
System.out.println(a);
in.close();
}
}
导入Scanner包,然后构造Scanner对象,用int a来接收读取到的值,最后输出关流.