Guest User

Untitled

a guest
Jan 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public class Compare3 {
  2.     public static Comparable largest(Comparable first, Comparable second,
  3.             Comparable third) {
  4.         Comparable largest;
  5.         if (first.compareTo(second) > -1) {
  6.             if (first.compareTo(third) > -1) {
  7.                 return first;
  8.             }
  9.             return third;
  10.         } else if (second.compareTo(third) > -1) {
  11.             return second;
  12.  
  13.         }
  14.         return third;
  15.     }
  16. }
Add Comment
Please, Sign In to add comment