about if statement in java

Computer Science
Tutor: None Selected Time limit: 1 Day

Hello!

i have syntax error here in this statement 

 if (a %2 == 1) && (b%2 == 1)

and this is the error : 

 Error: Syntax error on token "&&", invalid OnlySynchronized

please help me to solve the problem 

Oct 10th, 2014

The statement should be:

if(a%2==1 &&  b%2==1)

{

Action statements;

}

Take the braces for the whole if statement.

Oct 11th, 2014

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
Oct 10th, 2014
...
Oct 10th, 2014
Dec 6th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer