I don't know why this exception is not working...
import java.util.*;
public class a {
public static void main(String[] args) {
Scanner a = new Scanner(System.in);
int x;
x=a.nextInt();
if( x < 5) {
System.out.print("This is if statement");
}else if(x<3){
System.out.print("This is else if statement");
}else{
System.out.print("This is else statement");
}
a.close();
}
}
Aucun commentaire:
Enregistrer un commentaire