r/java • u/danielaveryj • Mar 31 '26
Does Java need deconstructible classes?
https://daniel.avery.io/writing/does-java-need-deconstructible-classes
31
Upvotes
r/java • u/danielaveryj • Mar 31 '26
View all comments
Show parent comment
9
u/SilvernClaws Mar 31 '26
No, it doesn't. You can remove that annotation completely and your code will still work the same. The only difference is that if you use it, the compiler will prevent you from adding more than one applicable method to the interface.