• <small id='fitah'></small><noframes id='fitah'>

        <bdo id='fitah'></bdo><ul id='fitah'></ul>
    1. <legend id='fitah'><style id='fitah'><dir id='fitah'><q id='fitah'></q></dir></style></legend>

        <i id='fitah'><tr id='fitah'><dt id='fitah'><q id='fitah'><span id='fitah'><b id='fitah'><form id='fitah'><ins id='fitah'></ins><ul id='fitah'></ul><sub id='fitah'></sub></form><legend id='fitah'></legend><bdo id='fitah'><pre id='fitah'><center id='fitah'></center></pre></bdo></b><th id='fitah'></th></span></q></dt></tr></i><div id='fitah'><tfoot id='fitah'></tfoot><dl id='fitah'><fieldset id='fitah'></fieldset></dl></div>
      1. <tfoot id='fitah'></tfoot>

        java, 以粗体打印

        java, print in bold(java, 以粗体打印)

            • <legend id='8swqO'><style id='8swqO'><dir id='8swqO'><q id='8swqO'></q></dir></style></legend>
                <bdo id='8swqO'></bdo><ul id='8swqO'></ul>
              • <small id='8swqO'></small><noframes id='8swqO'>

                  <tbody id='8swqO'></tbody>
                <i id='8swqO'><tr id='8swqO'><dt id='8swqO'><q id='8swqO'><span id='8swqO'><b id='8swqO'><form id='8swqO'><ins id='8swqO'></ins><ul id='8swqO'></ul><sub id='8swqO'></sub></form><legend id='8swqO'></legend><bdo id='8swqO'><pre id='8swqO'><center id='8swqO'></center></pre></bdo></b><th id='8swqO'></th></span></q></dt></tr></i><div id='8swqO'><tfoot id='8swqO'></tfoot><dl id='8swqO'><fieldset id='8swqO'></fieldset></dl></div>

                1. <tfoot id='8swqO'></tfoot>

                  本文介绍了java, 以粗体打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在 printf 中以粗体打印输出?"[1m testing bold" 什么都不做.

                  How can I print output in bold in printf? "[1m testing bold" does not do anything.

                  String format = "%-20s %-15s %-20s %-15s %-10s";
                  
                  System.out.printf(format, "Name", "Group_name", "Java_Prof_Level", "Cpr_Nr", "Gender", "[1m testing bold");
                  

                  推荐答案

                  你不能用 Java System.out 打印粗体.它只是流式传输到标准输出流,因此原则上它只是未格式化的文本.

                  You cannot print bold with Java System.out. It just streams to the standard output stream so, in principle, it is unformatted text only.

                  但是,某些软件包会解释特殊字符序列(所谓的 ANSI 转义序列)以允许格式化.

                  However, some software packages interpret special character sequences (the so-called ANSI escape sequences) to allow formatting.

                  请注意,ANSI 转义序列以转义字符开头,因此您还需要将其添加到您的字符串中.(试试 u001B[1m I am bold"33[0;1m" + I am bold".)

                  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" or "33[0;1m" + "I am bold".)

                  大多数 Unix 终端默认解释 ANSI 转义序列.在旧的 DOS 时代,您需要使用 ANSI.SYS 才能使转义序列起作用.

                  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.

                  在 Windows 和 Eclipse 终端中,代码不起作用.

                  In Windows and the Eclipse terminal the codes do not work.

                  这篇关于java, 以粗体打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How can I detect integer overflow on 32 bits int?(如何检测 32 位 int 上的整数溢出?)
                  Local variables before return statements, does it matter?(return 语句之前的局部变量,这有关系吗?)
                  How to convert Integer to int?(如何将整数转换为整数?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在给定范围内创建一个随机打乱数字的 int 数组)
                  Inconsistent behavior on java#39;s ==(java的行为不一致==)
                  Why is Java able to store 0xff000000 as an int?(为什么 Java 能够将 0xff000000 存储为 int?)
                    <tbody id='UrVQY'></tbody>
                    <bdo id='UrVQY'></bdo><ul id='UrVQY'></ul>

                        <i id='UrVQY'><tr id='UrVQY'><dt id='UrVQY'><q id='UrVQY'><span id='UrVQY'><b id='UrVQY'><form id='UrVQY'><ins id='UrVQY'></ins><ul id='UrVQY'></ul><sub id='UrVQY'></sub></form><legend id='UrVQY'></legend><bdo id='UrVQY'><pre id='UrVQY'><center id='UrVQY'></center></pre></bdo></b><th id='UrVQY'></th></span></q></dt></tr></i><div id='UrVQY'><tfoot id='UrVQY'></tfoot><dl id='UrVQY'><fieldset id='UrVQY'></fieldset></dl></div>
                        <tfoot id='UrVQY'></tfoot>

                        <small id='UrVQY'></small><noframes id='UrVQY'>

                            <legend id='UrVQY'><style id='UrVQY'><dir id='UrVQY'><q id='UrVQY'></q></dir></style></legend>