hi guys
iam trying to write a pice code that connectos to url and gets a response in xml its done purely using core
java but when i write the following pice of code my
IDE is showing error
public class xml extends XMLReaderAdapter {
private HashMap rates = new HashMap();
public static final
String RATE_TABLE_SOURCE = "http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml";
public xml() // line 1 throws Exception {
rates.put("EUR", new Double(1.00));
}
public static void main(String as[])
{
try
{
xml l= new xml();
l.parse(RATE_TABLE_SOURCE);
System.out.print("rates ");
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}
but when i remove the comment in the line 1 my coding compiles if not my IDE is showing me error in that line
my question is constructors are not members of class then why its asking to decalre throws class in the construstor
like overriding methods require looking for your methods
regards
amir
[ October 23, 2008: Message edited by: Amirtharaj Chinnaraj ]