Skip to content

Conversation

@faiyazkhira
Copy link

No description provided.

@someshium
Copy link

That's a good solution.

you can use scanner.nextInt() for reading integer inputs instead of Integer.parseInt(scanner.nextLine().trim());
also its redundant to close scanner at the end as we are reading user input using System.in and it automatically terminates once the program ends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants