We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Your code didn't pass neither of the test cases. If it did, either you were compiling using another code than the one above, or, I don't know... show us the compiler result.
Concerning why it worked without using "String e" simply because you don't have to assign this line scan.nextLine(); to anything, just use it normally.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Stdin and Stdout II
You are viewing a single comment's thread. Return to all comments →
Your code didn't pass neither of the test cases. If it did, either you were compiling using another code than the one above, or, I don't know... show us the compiler result.
Concerning why it worked without using "String e" simply because you don't have to assign this line scan.nextLine(); to anything, just use it normally.