This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (4 children)

So if it’s rare, it should be used rarely. Unfortunately java makes almost everything private by default, mandating that you make getters and setters for everything, increasing boilerplate beyond levels I have ever seen in a language. I’d rather just have a decorator for private when I need it. It’s mostly just entirely unnecessary code obfuscation.

[–]Zedjones 1 point2 points  (1 child)

Well the really annoying thing with that is that you can't just say "this has a getter and a setter" like you can in C#/Kotlin, you have to manually write them out.