S = "hello"
System.out.print(s)
I've also tried:
System.out.println("\033[4mhello\033[0m");
This prints out [4mhello[0m
I'm stuck on how to print hello underlined. I search everywhere but got no luck.
S = "hello"
System.out.print(s)
I've also tried:
System.out.println("\033[4mhello\033[0m");
This prints out [4mhello[0m
I'm stuck on how to print hello underlined. I search everywhere but got no luck.
use ANSI codes.
like:
public class Main {
public static void main(String[] args) {
System.out.println("\033[4;2m" + "Hello World");
}
}
note:
ANSI-coded strings wont work in windows terminal.