Почему это возвращает true?Ошибка сравнения строк в java
String b = "(5, 5)";
String a = "(7, 8)" ;
if(a.equals(b));
{
System.out.printf("Somehow \"%s\" and \"%s\" are the same" ,a,b);
}
Выход:
Somehow "(7, 8)" and "(5, 5)" are the same
[Почему Java, если оператор не в состоянии, когда он заканчивается точкой с запятой?] (Http://stackoverflow.com/questions/12772221/why-do-java-if-statement-fail-when-it-ends -in-semicolon) – Dukeling