Have you failed a job interview?
Send us your job interview questions and get correct answers.

BP8: Not too many parameters on a method

Try to keep the maximal number of parameters on a method to 3. If it has more, it may be fine. But always think about the number of parameters. Do we need them all? Wouldn't it be better to replace them by one complex object?

Comments

Anonymous
You are right, the text was corrected.
Anonymous
Do you know the difference between argument and parameter? You need to send as many arguments that method requires. But yes, Not to many parameters on a method.

Download Better Coder application to your phone and get unlimited access to the collection of enterprise best practices.

Get it on Google Play