Home > database >  How can I write bold text in the console for Java?
How can I write bold text in the console for Java?

Time:01-20

I am making a Blackjack program using Java, and I want to add bold text to it; however, I am having trouble knowing how to do that. Can anyone help?

I have tried to look up escape codes for it (I know they exsist, I just don't remember them) on here and on the web, but couldn't find anything useful.

CodePudding user response:

Here is one way to write texts bold on console for IDEs like NetBeans and Eclipse

String boldText= "Java_Bold_Text";
System.out.print("\033[0;1m"   boldText);
  • Related