This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
|
java:generic_methods [2017/02/07 17:04] gthanos |
java:generic_methods [2020/03/09 10:40] gthanos |
||
|---|---|---|---|
| Line 16: | Line 16: | ||
| public class OrderedPairUsage { | public class OrderedPairUsage { | ||
| public static void main(String args[]) { | public static void main(String args[]) { | ||
| - | Pair< | + | Pair< |
| - | | + | Pair< |
| - | Pair< | + | |
| - | | + | |
| boolean same = Util.< | boolean same = Util.< | ||
| //OR boolean same = Util.isEqual(p1, | //OR boolean same = Util.isEqual(p1, | ||
| Line 63: | Line 61: | ||
| Pair< | Pair< | ||
| new OrderedPair<> | new OrderedPair<> | ||
| - | boolean same = Util.compare(p1, p2); | + | boolean same = Util.isEqual(p1, p2); |
| if( same ) { | if( same ) { | ||
| System.out.println(" | System.out.println(" | ||