0

I'm trying to print different colors with printf. I've tried the following:

System.out.printf("%s%s%s%s\n","\u001B[31m","abcd","\u001B[30m","xyz");

I was expecting abcd to be in red and xyz to be in black but everything is black.

DCR
  • 14,737
  • 12
  • 52
  • 115

0 Answers0