Let's say I have a boolean method that uses an if statement to check if the return type should be true or false:
public boolean isValid() { boolean check; int number = 5; if (number > 4){ check = true; } else { check = false; } return check;
And now I want to use this method as a parameter of an if statement in another :
if(isValid == true)
So, basically, what I'm asking is, how can I check what the return type of the boolean method is in the parameters of the if statement? Your answers are deeply appreciated.
Graham S.
source share