I want to know if there is any way to print the underlined text on console using java String class.
You can only rely on how the String is interpreted by your console. For example, in bash
, you can do something like inserting your string between escape sequences \033[1m
and \033[0m
(for bold):
\033[1mInsert your String here\033[0m
You should read the documentation of your favorite console.
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