Link to home
Start Free TrialLog in
Avatar of kaushalshah
kaushalshah

asked on

JBuilder 7 error: catch

I am getting this error in my code for catch;


try
    {
      SAXParserFactory spf =SAXParserFactory.newInstance
     ();
      SAXParser parser = spf.newSAXParser();
      XMLReader r = parser.getXMLReader();
    }
 catch(IOException e) {
      e.printStackTrace();
    }

Error:
The exception can never be thrown in the corresponding try block.
ASKER CERTIFIED SOLUTION
Avatar of NetWize
NetWize

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kaushalshah
kaushalshah

ASKER

Thanks NetWize, it worked.   I'm new to Java.

Thanks