Advertisement
advictoriam

Untitled

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