There is no way to clear the screen inJAVA. It seems that you are a beginner in Javaand just migrated from age old Turbo C.
The reason because there is no clear screen is that you will never need it when you develop actual Javaprograms. Have you ever seen an application that clears it screen (apart from DOS based applications).
When you develop an application for a client, you do not expect him/her to go through your clumsy console. The console is available only for debugging purposes or for learning the language. When you deploy your application, you always have an interface associated with it (like your own internet browser or any other window).
So stop worrying about clearing the screen.
Of course, you can still manually clear the screen of text by printing out enough blank lines to run all other text out of the terminal window.
Most console windows will start of with about 25 lines of text, so something like the following should do what you want in most cases:
for(int i = 0; i < 40; ++i) {
System.out.println();
}
Chat with our AI personalities
One can easily download Eclipse Java for free on Eclipse's website. Popular download sites such as Softpedia, Sourceforge, and CNET also offer this download.
I am also finding you can use this: System.out.println("\033"); I have checked it in Eclipse. Please check it in any other compiler/ IDE. Sorry Doesn't work with my Java 6 Output - /033 /033 : Your slash is the wrong way around ("\033", not "/033").
A Java editor is nothing but a tool that can be used to edit java source files. Ex: Textpad, Notepad, Eclipse etc...
Java Integrated Development Environment (IDE) provides an environment to Edit, compile and debug and generate java codeThere are several java IDE like Eclipse, WSAD, BlueJ, JCreator etc
Eclipse is not a language. It is an Integrated Development Environment (IDE). These are tools designed to allow you to easily and quickly write, run, test, and debug code for various programming languages.There are versions of the Eclipse IDE for: Java, C/C++, and PHP.