I have a question about the compareTo statement.
If I have:
if(x.compareTo(y)==0)
I understand that I am asking if the value of x is equal to and . But if I want to ask if they are different? Should I place a denial forward?
if(!(x.compareTo(y)==0))
I do not understand how to ask that question.
The second thing that causes me noise is when I want to ask if x is greater than or equal to and . Should I write it as:
if(x.compareTo(y)>0 && x.compareTo(y)==0)
Or is there a more summarized form?
Thank you very much.