This code fails to compile:
class B {
B () throws Exception {
}
{ throw new Exception(); }
}
It appears to work ok for type Error, however.
class B {
B () throws Exception {
}
{ throw new Exception(); }
}
It appears to work ok for type Error, however.
- duplicates
-
JDK-4054256 instance initializers should be able to throw exceptions
-
- Closed
-