what i understood is calling should be in the try/catch block suppose iam using the throws keyword for the calling()it is showing the same exception.Exception must be caught or declare to be thrown mean what

Like what I've already mentioned above. Whenever you call a method that declares a checked exception, you muse either declare it or catch it. For your information, declaring an exception means having "throws" clause in your method definition.

It seems that you're trying to call myMethod1(). In myMethod1() you declare EOFException, so whenever you call myMethod1(), you need to either catch the EOFException or declare it.