Is there any practical usage for \r
and \b
in Java? Could someone give an example where it's used?
Formfeed escape is \f
, not \r
. The former is useful for clearing the screen in a console, whilst the second is useful for progress displays (as stated by aioobe).
\b
can be used in progress displays also, for example, on a ICMP Ping, you could display a dot when a ping is sent and a \b
when it is received to indicate the amount of packet loss.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With