I have to initialize file objects inside the constructor and for handling the exception, is it efficient using throws or should I go for try/
throws
try
It's okay to throw an exception in the constructor. I know some of the Java library classes do so (URI for just one example). I think it's better to throw an exception than to return an object in an unknown or invalid state.