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

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -