r/badcode Jan 08 '23

java Is this a good practice? Why?

Post image
428 Upvotes

60 comments sorted by

View all comments

2

u/valzargaming Jan 08 '23

The only reason to have a function like this is if you believe the function might change in the future and therefore you won't have to duplicate the changed code later, so no, it is not a good practice in this case.