Well, that's pretty simple.
If you're comparing an even and an odd number, you sort the odd one as being smaller.
If you're comparing 2 even or 2 odd numbers, you sort them according to the value normally.
If you're wondering about compareTo taking objects as parameters, you'll just need to cast them to Integers (or use generics).
Well, you know (or at least should know) how the compareTo() method works.
It returns a negative value if o1 is "less" (should be sorted before) than o2, 0 if they're equal and a positive value if o1 is "more" (should be sorted after) than o2.