I keep getting this error while compiliing my main file. This part of the program just reads from an input file, words one-by-one

"unreported exception java.io.IOException; must be caught or declared to be thrown"

But as I am calling a function from another class to read; in that class I have catch IOException nad FileNotFound Exception.

Please help.