public class repeater { public static void main(String argv[]) { int reps=0; String word=null; try { if (argv.length != 2) throw new IllegalArgumentException(); try { reps = Integer.parseInt(argv[0]); } catch (NumberFormatException nfe) { throw new IllegalArgumentException(); } word = argv[1]; for(int i=0; i< reps; i++) System.out.println(word); } catch (IllegalArgumentException iae) { System.out.println("Error"); System.out.println("Usage: java repeater [number] [word]"); } } }