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.
ya so the thing is when we put nextLine() immediately after the nextInt(), then the nextLine will recalls(again calls) the before function which is an integer thus the waiting for end to call the string but once we press enter the nextLine will read it as input.
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 →
ya so the thing is when we put nextLine() immediately after the nextInt(), then the nextLine will recalls(again calls) the before function which is an integer thus the waiting for end to call the string but once we press enter the nextLine will read it as input.