|
|
| java help |
Expert:Maurice
Code a statement to test a catch block that catches an IOException. |
| Answers |
Hi friend,
Code a statement to test a catch block that catches an IOException.
import java.io.*; class IOExample { public static void main(String[] args) { try { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader bufReader = new BufferedReader(isr); System.out.println("Enter the number "); double subtotal = Double.parseDouble(bufReader.readLine()); } catch (IOException e) { e.printStackTrace(); } } }
Thanks
|
| More Questions |
|
|
Post Answers
Ask Question
Facing Programming Problem?
|
|
|
|
|