Anonymous
public text v1 · immutablepublic class elseIf
{
public static void main(String[] args)
{
System.out.print("Your age please: ");
String input = System.Console.readLine();
int age = Integer.parseInt(input);
if (age >=18) {
System.out.print("You're getting old ");
} else if (age < 18) {
System.out.print("You're a young one ");
}
System.out.println("at the age of " + age);
}
}