Ask coding questions

← Back to all posts
clear console in Java
Camilo_ReneRen1 (0)

Can anybody help me to clear console in a Java program at

utgtest (0)

There is a a much better way to do this:


CSharpIsGud (41)

Try outputting this \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

It does not really clear the console but you wont be able to see any text that was there before you outputted them

PYer (2386)

@CSharpIsGud Yeah, I do that to with python. But a shorter way would be to do "\n"*100 :)

RyanRana (175)

I do not believe it is possible but why would you need to any way?

BlueLightning42 (1)

Sorry clearing the console is only supported in python as of this moment

PYer (2386)

@BlueLightning42 Only with eval mode though. You have to import the replit module. You cannot do it in a .py file.