← Unit 2 · all exercises
Saved in this browser only

At least one above zero

Return true when at least one of the two numbers is greater than zero.

boolean eitherPositive(int a, int b)

Solution.java
Loading editor…
Results

Examples

  • eitherPositive(3, -4) → true
  • eitherPositive(-3, -4) → false

There are also 3 hidden tests you can't see. Solve the problem, not the examples.