[Solved] How do we return a boolean variable from a method?
[ad_1] For simple methods that do not have many checks on the Boolean conditions, it’s usually fine to simply return true or false. boolean methodName(..arguments) { return <checkCondition> } The above snippet is a reduction of your code’s intent (I say intent because yours will always return false). For more complex functions, a common rule … Read more