Hi, I am wondering if there is a more graceful manner in which to clear the console window previously printed values apart from using a loop in which the println(); is repeated.

Many thanks.

Recommended Answers

All 2 Replies

There are some system-specific ways to do it, but it's not really the place of System.out.println() to do that.

nor is it the place of any program to assume it can control what appears in the console window.
The console is shared between everything running in the command shell that created that console, not just by any one program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.