How do I clear the console in Java? This is my code but it doesn't do anything.
switch (commandTyped.toUpperCase()) {
case "I":
final String ANSI_CLS = "\u001b[2J";
final String ANSI_HOME = "\u001b[H";
System.out.print(ANSI_CLS + ANSI_HOME);
System.out.flush();
inventory.check();
break;
}
Thanks!