Vote count:
0
Question: Is it goo to pass param in method and check it there? Or it's better to check it inside first method and not call another one? For example:
public void someMethod(){
boolean flag = true;
.....(calculate something)
anotherMethod(flag);
}
public void anotherMethod(boolean flag){
if(flag){
doSomething();
}
}
Thanks a lot!
asked 24 secs ago
Best practices with method parameters
Aucun commentaire:
Enregistrer un commentaire