+ 1
public class IfClass { public static void main(String[] args) { int noOfPetals = 5; if (noOfPetals % 2 ==
Eror shows me in } else {. Please solve it
4 odpowiedzi
+ 5
https://code.sololearn.com/cB4HSoKru7QZ/?ref=app
Remove the semicolon after if (condition)
+ 10
//remove ; after if (condition)
if(noOfPetals % 2 == 0){
+ 5
Pls reframe you Question once .
Your code is totally incomplete
Or paste it in the comment box or code playground
+ 1
public class IfClass
{
public static void main(String[] args) {
int noOfPetals = 5;
if (noOfPetals % 2 == 0); {
System.out.println("she loves me");
} else {
System.out.println("she loved me not");
}
}
}