Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Compare3 {
- public static Comparable largest(Comparable first, Comparable second,
- Comparable third) {
- Comparable largest;
- if (first.compareTo(second) > -1) {
- if (first.compareTo(third) > -1) {
- return first;
- }
- return third;
- } else if (second.compareTo(third) > -1) {
- return second;
- }
- return third;
- }
- }
Add Comment
Please, Sign In to add comment