步驟如下:
導(dǎo)包(必須放在類class與包名package的中間)
import java.util.Scanner;
1
創(chuàng)建Scanner對(duì)象
Scanner input = new Scanner(System.in);