What is the difference between these two methods? Using params or just doing everything in one class
i just learned this in class and dont get why this is a thing
4 Replies
Having a separate method allows you to reuse it
It's not as visible with just doing addition inside, but if you were doing some more complex operations, it's very useful
makes sense
ty
we usually only create a method, when you know you'll need to use the code again
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.