I want to print values from 1 to 20000 and the output should be printed one above another ie output should be overwritten and final output is 20000 only on the output screen. please help me how it can be done..
Google for jcurses or java curses library. Note, however, that it is not possible to make it work in all cases. Some terminal windows will not accept cursor movement control sequences, or may have their own that are different from the common ones. Your other option would be to make it a Swing app and do it in a GUI.