I've never encountered something like this and I don't know this type of coding! What is this? (I'm pretty new to Java)
DefaultHandler handler = new DefaultHandler() {
boolean bfname = false;
boolean blname = false;
boolean bnname = false;
boolean bsalary = false;
public void startElement(String uri, String localName,String qName,
Attributes attributes) throws SAXException {
// code
}
public void endElement(String uri, String localName,
String qName) throws SAXException {
// code
}
public void characters(char ch[], int start, int length) throws SAXException {
// code
};
After constructor calling there is a brace (!?) and it seems that there is an overriding of some methods. Then the brace is terminated with a semicolon. I've never seen brace after a constructor call. Is it normal? How is it called? Thank you!
p.s: on Eclipse, if i remove the semicolon, it says LocalVariableDeclarationStatement
error.