This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When running or debugging code inside NetBeans, the output window displays the text printed by System.out.print, or System.out.format, or System.out.printf calls only when the code ends execution. Calls to System.out.flush don't help either. If I use println calls or add \n in the previously listed methods, the code executes properly. The sample code: import java.util.Scanner; public class Test { public static void main( String args[] ) { Scanner input = new Scanner( System.in ); System.out.print( "Enter first integer: "); //System.out.flush(); int x = input.nextInt(); System.out.print( "Enter second integer: " ); // System.out.flush(); int y = input.nextInt(); System.out.printf( "Sum is %d\n", x + y ); } }
I'm not sure that print category is for this issue. Print category is for Print and Print Preview actions from main menu. Reassigning for next review...
duplicate of #56341 *** This issue has been marked as a duplicate of 56341 ***