I have a syntax error in the following line. However I can't understand what is the reason of this error.
if (address1.compareTo(address2) = 1)
System.out.println(address1 + " is greater than " + address2);
What I want to achieve is printing proper message if and only if compareTo
returns 1
.