2

我有一个简单的主要方法,其中包括数十个“System.out.print”,如下所示:

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");

}

但是,当我运行程序时,BlueJ 只显示 24-70。

为什么?

4

1 回答 1

3

在 BlueJ 终端窗口中转到Options并打开Unlimited Buffering. 这将解决您的问题。您也可以打开Clear Screen at method calls以使每个程序在清晰的屏幕上运行。

于 2013-05-11T02:28:34.157 回答