HI, Sorry for the error in the questions IT is editited correctly now
___________________________________________________________________________
1.Static and Instance variable initializer expressions.
Cannot pass on the checked exceptions. Must catch and handle them.
2.Static Initialzer
Cannot pass on the checked exceptions. Must catch and handle them.
Q1.why cannot we pass checked exception's to static and instance VARIBLE initializer.
(The
word PASS is what i cannot understand. How can someone pass exception in this context(intiliazer)).
___________________________________________________________________________
Q2.can we pass exceptions from constructor to constructor.?
___________________________________________________________________________
3.Instance initializer blocks.
Instance Initializers in anonymous classes can throw any exception
Q3.What does it mean by the above statement?
Q. IF the above code is correct then why does this not compile?
new Runnable()
{
{
synchronized(this)
{wait(); //throws checked exception
}
}//instance block
public void run()
}
___________________________________________________________________________
Please explain,Thank you
[ July 30, 2007: Message edited by: saravana.T kumar ]
[ July 30, 2007: Message edited by: saravana.T kumar ]