Console based progress in Java [duplicate]
You can print a carriage return \r to put the cursor back to the beginning of line. Example: public class ProgressDemo { static void updateProgress(double progressPercentage) { final int width = 50; // progress bar width in chars System.out.print(“\r[“); int i = 0; for (; i <= (int)(progressPercentage*width); i++) { System.out.print(“.”); } for (; i … Read more