Java.util.Scanner
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int number = (int) (Math.random() * 10);
int guess;
do {
System.out.println("guess 1 ~ 9");
guess = scanner.nextInt();
/* 從入力流取得內容
* nextByte()
* nextShort()
* nextLong()
* nextFloat()
* nextDouble()
* nextBoolean()
* next()
* nextLine()
*
* */
} while(guess != number);
System.out.println("OK!");
}
}