0

Solve errors on this code

public class Program { public static void main(String[] args) { int age = 34; if (age > 24){ if (age<30){ System.out.println("yes") } else { System.out.println("no") } else { System.out.println("no answer") }

15th Apr 2017, 7:50 AM
Faridi Adidi Sadick
Faridi Adidi Sadick - avatar
2 ответов
+ 10
I think semicolon is mandatory in javascript
15th Apr 2017, 9:39 AM
Sachin Artani
Sachin Artani - avatar
+ 7
public class Program { public static void main(String[] args) { int age = 34; if (age > 24){ if (age<30){ System.out.println("yes");//missed semicolon } else { System.out.println("no");//missed semicolon } }//missed closing bracket of if else { System.out.println("no answer"); //missed semicolon } }//missed closing bracket }//missed closing bracket
15th Apr 2017, 8:19 AM
Shraddha
Shraddha - avatar