What is the benefit of using a factory class in the following code?
- by Emanuil
Here's the code:
SAXParserFactory mySAXParserFactory = SAXParserFactory.newInstance();
SAXParser mySAXParser = mySAXParserFactory.newSAXParser();
Why use that if you can use something like:
SAXParser mySAXParser = new SAXParser();