Format your string like so:
[# ] 1%\r
Note the \r
character. It is the so-called carriage return that will move the cursor back to the beginning of the line.
Finally, make sure you use
System.out.print()
and not
System.out.println()
More Related Contents:
- android editText is not prints my input given to it
- How can I complete my number guessing game?
- Spring @Transaction method call by the method within the same class, does not work?
- java.text.ParseException: Unparseable date: java.text.DateFormat.parse(DateFormat.java:579)
- Why can Java Collections not directly store Primitives types?
- What is the purpose of flush() in Java streams?
- How can I create 2 separate log files with one log4j config file?
- How to remove leading zeros from alphanumeric text?
- How can I write custom Exceptions?
- What is java pojo class, java bean, normal class? [duplicate]
- Passing pointers between C and Java through JNI
- “Cannot create generic array of ..” – how to create an Array of Map?
- LINQ for Java tool [closed]
- How to parse number string containing commas into an integer in java?
- What’s an example of duck typing in Java?
- Is stopwatch benchmarking acceptable?
- What optimizations can I expect from Dalvik and the Android toolchain?
- Android App Bundle introduces Resource Not found crash in Android app
- Java seek a method with specific annotation and its annotation element
- JPA OneToMany and ManyToOne throw: Repeated column in mapping for entity column (should be mapped with insert=”false” update=”false”)
- SERVER_ERROR: [code] 1675030 [message]: Error performing query
- HQL Hibernate INNER JOIN
- HashSet contains duplicate entries
- CreateProcess error=740, The requested operation requires elevation
- JPA Criteria API with multiple parameters
- android:clickable=”true” mean’s that it’s not clickable?
- Sorting two arrays simultaneously
- Reading data from bluetooth device in android
- java swing component cannot be resolved
- Runtime.getRuntime().exec(cmd) hanging