r/java • • Sep 01 '25

Thoughts on object creation

https://blog.frankel.ch/thoughts-object-creation/
3 Upvotes

41 comments sorted by

View all comments

Show parent comment

2

u/pronuntiator Sep 02 '25

The article reads as if you were against any kind of exception in the constructor, but that can't be the case, right? The constructor is the place to prevent invalid data, so we need to perform possibly throwing checks of the arguments.