You cannot print bold with Java System.out
. It just streams to the standard output stream so, in principle, it is unformatted text only.
However, some software packages interpret special character sequences (the so-called ANSI escape sequences) to allow formatting.
Note that ANSI escape sequences start with an escape character, so you need to add that to your string also. (Try "u001B[1m I am bold".)
Most Unix terminals interpret ANSI escape sequences by default. In old DOS times, you needed to use ANSI.SYS for the escape sequences to work.
In Windows and the Eclipse terminal the codes do not work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…