|
|
|
|
|
by eweise
5470 days ago
|
|
1) That is probably quite slow since you're creating a new class not just a new object. 6) Sure, now let's see all the boilerplate builder code you need to need to make that work. 7) Of course you can check for exceptions, you just don't need to add a bunch of throws clauses all over your code base to get the error bubbling up to the place where you want to handle it. 8) Doesn't look like a quirk to me. Looks pretty straightforward. |
|
These clauses allow static verification. In other words, the compiler will remind you to handle the error cases.
If you fail to do this and the compiler doesn't nag you, you can bet that most developers will never bother doing it.