Java error: cannot find symbol
Go to solution
Solved by minibois,
Pretty sure instead of the nextLine(); on the Int, you need to use nextInt();
Basically you're trying to read an int into the program, while it is expecting a String with nextLine() and using nextInt will allow it to accept an int.
Also, yes int is preferred for age input; as that is actually a number you can do calculations with.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now