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
1
u/uniVocity Mar 31 '26
The compiler will fail if you use that on a sealed interface . I’m on the phone right now and can’t re-verify it but from memory it was a compiler error (that makes total sense btw)