0

I got error ! How to solved?

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner User = new Scanner(System.in); System.out.println("Welcome to the Theater!"); System.out.println("_______________________"); System.out.println("Please type in your age"); int age=User.nextLine(); if (age<20){ System.out.println ("Congratulation, you got discount 20%"); }else{ System.out.println("Oooop! You are not

18th Jan 2018, 1:50 PM
Lon Borey
Lon Borey - avatar
3 Answers
+ 2
need int age = User.nextInt();
18th Jan 2018, 2:05 PM
Anton
Anton - avatar
0
thank you for your help
18th Jan 2018, 2:10 PM
Lon Borey
Lon Borey - avatar