I am trying to underline a certain piece of text, however it is not outputting what I had expected.
String ANSI_RESET = "\u001B[0m";
String ANSI_UNDERLINE = "\u001B[4m";
String ANSI_RED = "\u001B[31m";
System.out.print(ANSI_UNDERLINE + "HelloWorld" + ANSI_RESET);
This does not output an underlined "HelloWorld", however it does output red text if I replace ANSI_UNDERLINE with ANSI_RED.
Does anyone have an explanation as to why it is not outputting underlined text in the console?