0
What is wrong with my code
public static void main(String[] args) { int age = 25; if (age>0){ if (age>19){ System .out.println ("Allowed"); }else{ System.out.println ("Deny"); }else{ System .out.println ("Error!"); }
5 Answers
+ 2
You should indent your code properly, it will be easier to debug that way.
public class Program
{
public static void main(String[] args) {
int age = 25;
if (age>0){
if (age>19){
System .out.println ("Allowed");
}else{
System.out.println ("Deny");
}
}else{
System .out.println ("Error!");
}
}
}
https://code.sololearn.com/c7mJg46Gx1Oe/#java
0
Am i supposed to type my errors?
Or how do i go about it
0
Omg... Thank you so much for your help... It Worked!!!!! đ