1 { 2 { 3 // test 1 4 try { 5 Integer.parseInt("howdy"); 6 System.out.println("Error: test 1 should have thrown a NumberFormatException; it threw nothing"); 7 } catch (NumberFormatException e) { 8 // test passed! (this is the expected behavior) 9 } catch (Exception e) { 10 System.out.println("Error: test 1 should have thrown a NumberFormatException; instead it threw a " + e); 11 } 12 } 13 }