It is the errors that lead to insightful study
I am an undergraduate pursuing my bachelors in Computer Science and Engineering. I love to write and enhance web development skills. Web development seems very interesting to me as it is not just coding but also creativity, so I'm gaining knowledge and practising to develop my skills with HTML and CSS.
Markdown supported · ⌘↵ to post
Nice! This is a good way to overcome this situation.
Another approach would be to pass nextLine() to parseInt():
int year = Integer.parseInt(in.nextLine());
I like it better this way because for me it's less confusing than having a nextLine() lost between the lines.
Jeevika Sirwani
Crisp and clear.🙌