Which do you think is a better method of forming a boolean test:
A:
boolean someTest(){
boolean retVal = false;
if(someCondition){
retVal = true;
}
return retVal;
}
B:
boolean someTest(){
if(someCondition){
return true;
}
return false;
}
C:
boolean someTest(){
return someCondition;
}
Where someCondition may be a complex statement.
C
cBradley
@cBradley
0
Reputation
1
Posts
11
Profile views
0
Followers
0
Following
Best posts made by cBradley
This user hasn't posted anything yet.
Latest posts made by cBradley
-
Maintainable methods