Code:
public class A
{
public void showfile() throws java.io.IOException
{
// do someting
}
}
What the method does is:Throw IOException
So when you use/call it, you have to either catch that exception or look for it again.
For example:
try
{
showfile();
}
catch(IOException e)
{
e.printStackTrace();
}