Write an expression that will cause the following code to print "I am a teenager" if the value of userAge is less than 20.

import java. Util. Scanner;

public class AgeChecker {

public static void main (String [] args) {

int userAge;

scanner scnr = new Scanner(System. In);

userAge = scnr. NextInt(); // Program will be tested with values: 18, 19, 20, 21.

if (/ *Your solution goes here*/ ) {

System. Out. Println("I am an adult");

}

else {

System. Out. Println("I am a teenager");

}

}

}



Answer :

Other Questions