【发布时间】:2016-09-15 01:16:51
【问题描述】:
在 Eclipse 中执行/打印了一些语句后如何清除控制台。我使用了 flush() 但没有工作。只是发布示例代码。
System.out.println("execute ");
System.out.println("these set of lines ");
System.out.println("first");
Thread.sleep(2000); // just to see the printed statements in the console
System.out.flush(); // it is not clearing the above statements
【问题讨论】:
-
我认为您正在尝试使用 java 清除 Eclipse 控制台。那正确吗?如果是这样,我认为您可能不会以这种方式影响应用程序控制台。除非你正在开发一些在 eclipse 中使用的工具。
-
你为什么需要这个?
-
是的,这仅限于 Eclipse 而不是任何生产应用程序
标签: java eclipse console flush