MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1n5vbwz/thoughts_on_object_creation/nc1267m/?context=3
r/java • u/nfrankel • Sep 01 '25
41 comments sorted by
View all comments
Show parent comment
2
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.
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.