import java.util.Random; public class Ex09_3 { public static void main(String[] args) { Random rnd = new Random(); int[] x = new int[10]; for (int i=0; i<10; i++) { x[i] = rnd.nextInt(30) + 1; // 乱数を生成 disp(x[i]); // メソッド disp() を呼び出して実行 } } // 棒グラフを描くメソッド public static void disp(int num) { System.out.printf("%2d|", num); for (int i=0; i