java - Why Syntax error appears on the following if condition -
hi have following if condition in java
if ((i%3)==0) work else if ((i%3 || i%5)==0)----syntax error appears on line work
and showing me following syntax error... multiple markers @ line - operator || undefined argument type(s) int, int - syntax error on token "or", . expected - cannot resolved or not field
can 1 please tell me how can fix 1 ??
you have have comparison every part of condition. in case else if
should this
else if (i%3 == 0 || i%5 == 0)
Comments
Post a Comment