0

I've written some Sysout lines, and I want to create an if else where the output console is cleared?

if(pass.length() < 8){
        System.out.println("");
//now I would like the output terminal to be cleared
    }else {
        System.out.println("");
    }

Prepared to answer any questions. Feel free to edit. If this is a previous answered question, please let me know, I can't seem to find anything.

mhvejs
  • 3
  • 7

2 Answers2

0

IntelliJ IDEA console is not a real terminal, so there is no command to clear it from your Java code.

chptr-one
  • 337
  • 1
  • 9
0

You can easily do that with Grep Console plugin.

But only for a Console - and you are talking about console, not Terminal that is used for JS/NPM/GoLand and others. config

Meo
  • 11,291
  • 5
  • 44
  • 51