java - What is wrong with my if-else syntax? -


currently new java, , right i'm doing assignment involving if else statements. can please why javac reading else dangling? syntax should right unless missing here.enter image description here

you have remove semicolon after if-statement. otherwise braces after if not executed.

i hope fix problem.

if(statement); {     //the content not executed in realtion if-statemen } 

otherwise:

if(statement) {     //the content executed in realtion if-statemen } 

Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

jquery - jqGrid update specific column data with out refreshing the entire column? -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -