/*************************************************************** Display 10 random 2D solid boxes of 'a x b' consisting of '*'s, where a represents the length and b represents the width of the box. Both a and b are random integers [0,9] 15 Oct 2007 By Ida Pu, Usama Khan, William Oakley, Remigijus Raisys, Toby Ho ****************************************************************/ import java.util.Random; public class t9 { public static void main(String args []) { Random r=new Random(); // random seed for (int k=1; k<=10; k++) { int a=1+r.nextInt(10); int b=1+r.nextInt(10); for (int i=1; i<=a; i++) { for (int j=1; j<=b; j++) { System.out.print("*"); } System.out.println(); } System.out.println(); } } }