Advertisement
advictoriam

Untitled

Jan 8th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. /**
  2.    A class to compare numbers.
  3. */
  4. public class Numbers
  5. {
  6.    /**
  7.       Checks whether three numbers are all different
  8.       @return true if none of the numbers a, b, or c are equal to another
  9.    */
  10.    public boolean allDifferent(int a, int b, int c)
  11.    {
  12.       if(a == b || a == c){return false;}
  13.       if(b == c){return false;}
  14.       return true;
  15.    }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement