0
Java if else statement used in restricting someone who's below 18 from entering an adult site
3 ответов
+ 3
For java, it should be,
if(age<18)
System.out.println("access restricted!");
else
System.out.println("access granted");
P.S. Edited with corrected syntax
+ 1
For java,it should be
if (general)
System.out.println("female ");
else
System.out.pribtln ("male");
0
int age=12;
if(age<18){
access_restricted();
}else{
access_granted();
}