/* Author: James Tam Date: October 16, 2003 A program to show a case when a method calls another method that may throw an exception but the caller cannot properly handle the exception (via a try-catch block) and must delegate the responsibility to callers's calling method. */ import java.io.*; public class TCExample { public void method () throws IOException, NumberFormatException { BufferedReader br; String s; int num; System.out.print("Type in an integer: "); br = new BufferedReader(new InputStreamReader(System.in)); s = br.readLine(); num = Integer.parseInt(s); } }