Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part 3, section 19, known bug with Netbeans System.out.print #439

Open
brunojustino opened this issue Nov 2, 2023 · 0 comments
Open

Part 3, section 19, known bug with Netbeans System.out.print #439

brunojustino opened this issue Nov 2, 2023 · 0 comments

Comments

@brunojustino
Copy link

There's a known bug in Netbeans when you use System.out.print and put a scanner after. When you run the program, it does not print the System.out.print message. Instead it wait for the user input before printing the message.

Steps:

System.out.print("Search for? ");
int searching = Integer.valueOf(scanner.nextLine());

Expected: print: "Search for? " and waits for user input.
What happening: It waits for user input and after that prints: "Search for? "

Simple using System.out.println fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant