if (getCheckEmailFromServer == true || getCheckNameFormServer == true || getCheckNumberFormServer == true); { Intent nextActivity = new Intent(this, GiftHomeActivity.class); startActivity(nextActivity); } else { if (getCheckEmailFromServer == false) { emailHint.setText("You enter wrong Email. Please, try again."); } else if (getCheckNameFormServer == false) { nameHint.setText("You enter wrong name"); } else if(getCheckNumberFormServer==false) { numberHint.setText("You enter wrong number"); } } } catch (IOException e) { e.printStackTrace(); } } } 

In this case, else is highlighted, and writes "else without if"

Closed due to the fact that off-topic participants pavlofff , Yura Ivanov , user194374, zRrr , cheops Jul 1 '16 at 18:12 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - pavlofff, Yura Ivanov, Community Spirit, zRrr, cheops
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 3
    Semicolon is after you ifa. - DanielOlivo
  • Thank you, just noticed - Cyril
  • @DanielOlivo, issue the answer, it’s the right one - Vladyslav Matviienko
  • if (getCheckEmailFromServer == true || getCheckNameFormServer == true || getCheckNumberFormServer == true); You can simplify, and do not write == true for the future. - Silento

2 answers 2

In the first construction, remove the ";" after the if condition and you will be happy

learn to read the error log, everything is written there :)

    The first line after the if construct is ";".