如何在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