问题
I have a simple main method which includes dozens of "System.out.print" as depicted below:
public class StudentTester
{
public static void main()
{
System.out.print('\f');
System.out.println("1");
System.out.println("2");
System.out.println("3");
System.out.println("4");
System.out.println("5");
System.out.println("6");
System.out.println("7");
System.out.println("8");
System.out.println("9");
System.out.println("10");
System.out.println("11");
System.out.println("12");
System.out.println("13");
System.out.println("14");
System.out.println("15");
System.out.println("16");
System.out.println("17");
System.out.println("18");
System.out.println("19");
System.out.println("20");
System.out.println("21");
System.out.println("22");
System.out.println("23");
System.out.println("24");
System.out.println("25");
System.out.println("26");
System.out.println("27");
System.out.println("28");
System.out.println("29");
System.out.println("30");
System.out.println("31");
System.out.println("32");
System.out.println("33");
System.out.println("34");
System.out.println("35");
System.out.println("36");
System.out.println("37");
System.out.println("38");
System.out.println("39");
System.out.println("40");
System.out.println("41");
System.out.println("42");
System.out.println("43");
System.out.println("44");
System.out.println("45");
System.out.println("46");
System.out.println("47");
System.out.println("48");
System.out.println("49");
System.out.println("50");
System.out.println("51");
System.out.println("52");
System.out.println("53");
System.out.println("54");
System.out.println("55");
System.out.println("56");
System.out.println("57");
System.out.println("58");
System.out.println("59");
System.out.println("60");
System.out.println("61");
System.out.println("62");
System.out.println("63");
System.out.println("64");
System.out.println("65");
System.out.println("66");
System.out.println("67");
System.out.println("68");
System.out.println("69");
System.out.println("70");
}
However, when I run the program, BlueJ shows ONLY 24-70.
Why?
回答1:
In the BlueJ terminal window Go to Options
and turn on Unlimited Buffering
. This will solve your problem. You may also turn on Clear Screen at method calls
to make each program run on a clear screen.
来源:https://stackoverflow.com/questions/16493057/is-there-a-limit-on-the-maximum-of-number-of-lines-which-can-be-printed-to-conso