Have a compareTo method, which will return the difference of the two numbers. Then use the above logic in your showResult method. Your getNum method doesn't need to be changed.
Type: Posts; User: helloworld922
Have a compareTo method, which will return the difference of the two numbers. Then use the above logic in your showResult method. Your getNum method doesn't need to be changed.
Please surround your code with highlight tags. See my signature for how to do this.
Think about this mathematically:
given two numbers a and b, you can determine which how the two numbers are...