Error: unreported exception java.io.IOException; ??
I'm just learning java so bare with me!! i'm just modify some examples i've read through in a book and keep getting the following error at the if statement. could someone tell me what it means and the possible solution??
Error: "unreported exception java.io.IOException; must be caught or declared to be thrown"
Thank you very much
This is all in public static void main:
stream_in = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
System.out.println("Input the transaction amount.");
if ((line=stream_in.readLine()) !=null) //the error appears here?
transaction = Double.valueOf(line).doubleValue();
transaction = 0;
System.out.println("New Balance: £ " + wallet.getBalance());