← Unit 2 · all exercises
Saved in this browser only

Are they different

Return true when the two numbers are not the same.

boolean isDifferent(int a, int b)

Solution.java
Loading editor…
Results

Examples

  • isDifferent(1, 2) → true
  • isDifferent(4, 4) → false

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