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.
No coz before reading next integer or real number, buffer trimmed of any space or new line, if present in buffer.
JVM does it automatically because it knows whatever to be next should not contain space or new-line. So if there exist anything, it trims off...
This is not the case with space or \n...
Hope this helps :)
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 →
No coz before reading next integer or real number, buffer trimmed of any space or new line, if present in buffer. JVM does it automatically because it knows whatever to be next should not contain space or new-line. So if there exist anything, it trims off... This is not the case with space or \n... Hope this helps :)