firstChoice = new Scanner(System.in); System.out.println("You chose " + firstChoice.nextLine());
I know what happens, I'm giving my Scanner object the parameter of the keyboard input and then I am outputting "You chose" plus what the user has typed in. My question is what exactly does the nextLine method do to print out my Scanner objects parameter?
I have read it "advances this scanner past the current line and returns the input that was skipped.", as I'm a beginner could you explain in simply terms what this method does to display the objects parameter.