What to do here(cant compile)?
import java.util.*;
import java.io.*;
Code:
class mainprogram
{
//These are available for the whole class
static InputStreamReader osw = new InputStreamReader (System.in, "Cp850");
...
}
Code:
C:\Kryptator\mainprogram.java:9: unreported exception java.io.UnsupportedEncodingException; must be caught or declared to be thrown
static InputStreamReader osw = new InputStreamReader (System.in, "Cp850");
^
1 error
Tool completed with exit code 1
They want me declare the exception, but how? I know how to do it if it was inside a method, but outside a method?