Skip to content
Sign upLog in

How do you clear terminal in Java?

Profile icon
SriramManikand1

I need help with clearing the terminal/ console in java. Any help will be appreciated!

You are viewing a single comment. View All
Profile icon
Funkus

You can use this code in a method System.out.print("\033[H\033[2J");
System.out.flush();