Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Changing the color of text in the console
I have a little problem. I'm making a console application, but would like to add some color to it. I know that it's possible, but for some reason the color of the text produced in the console by Java always defaults to light gray. Is there some way to change this color? There must be a command to do it.
For example, I want to write a Java program that produces the same output as this C++ program:#include #include #include
using namespace std;
cout << "Hi" << endl;
cout << "Bye" << endl;
Does anyone know how to accomplish this? If you do, please let me know.
0 · ·