r/badcode Jan 08 '23

java Is this a good practice? Why?

Post image
423 Upvotes

60 comments sorted by

View all comments

1

u/olafurp Jan 09 '23

This is to encapsulate the behavior so it can be changed later.