how to clear the console java code example Example: java clear console Runtime.getRuntime().exec("cls");