Very Simple Java Input
Go to solution
Solved by reniat,
that should more or less work, but do sc.nextInt() so that the value you get is an int. Also, those values don't need to be static. Static is useful, but can be abused and lead to hard to test code, so it's good to get in the habit of not using static unless you really intend to.

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