How to clear console in Java - Eclipse SDK
问题 I've searched far and wide, but haven't found something that works... There HAS to be a way!!! So, what I need is a code that clears the console in Eclipse (makes it blank). And NO, not printing 50 blank lines, CLEARING IT! I found this: Import import java.io.Console; public void ClearConsole() { Console console = System.console(); if (console == null) System.out.println("Couldn't get Console object !"); console.clear(); } But it gives me an error: " The method clear() is undefined for the