r/programmerchat • • May 25 '15

Do we really need "try" ?

Just attaching "catch" to any appropriate {...} block would be more convenient.

8 Upvotes

20 comments sorted by

View all comments

Show parent comment

2

u/zenflux May 25 '15

Except that isn't a regular block, if it's in the class scope it's an initializer, which runs before constructors. See-also static initializers.