gpt4 book ai didi

java - 有没有办法可以更改文本的打印颜色?

转载 作者:行者123 更新时间:2023-11-29 07:36:44 26 4
gpt4 key购买 nike

For Example

String text = "sample";
System.out.println(text);

I want the text to appear in color RED.Tried java.awt but a bit confusing for me.

最佳答案

如果你使用的是eclipse...你可以使用

System.err.println("...");

这将在 eclipse 控制台中以红色打印。

关于java - 有没有办法可以更改文本的打印颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34789448/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com