2004-11-10 ランダム iアプリ //0〜8までの数値をランダムに出力 import java.util.Random; Random rnd = new Random(); System.out.print(Math.abs(rnd.nextInt() % 9));