@@ -0,0 +1,458 @@
+// Use throws.%0Aclass ThrowsDemo %7B%0A  public static char prompt (String str) throws java.io.IOException %7B%0A    System.out.print(str + %22: %22);%0A    return (char) System.in.read();%0A  %7D%0A  %0A  public static void main(String args%5B%5D) %7B%0A    char ch;%0A    try %7B%0A      ch = prompt(%22Enter a letter%22);%0A    %7D%0A    catch(java.io.IOException exc) %7B%0A      System.out.println(%22I/O exception occurred.%22);%0A      ch = 'X';%0A    %7D%0A    %0A    System.out.println(%22You pressed %22 + ch);%0A  %7D%0A%7D%0A

Use throws