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

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

        <tfoot id='KdxIQ'></tfoot>
      1. <legend id='KdxIQ'><style id='KdxIQ'><dir id='KdxIQ'><q id='KdxIQ'></q></dir></style></legend>

      2. java, 以粗体打印

        时间:2023-09-30
        <i id='8x9zR'><tr id='8x9zR'><dt id='8x9zR'><q id='8x9zR'><span id='8x9zR'><b id='8x9zR'><form id='8x9zR'><ins id='8x9zR'></ins><ul id='8x9zR'></ul><sub id='8x9zR'></sub></form><legend id='8x9zR'></legend><bdo id='8x9zR'><pre id='8x9zR'><center id='8x9zR'></center></pre></bdo></b><th id='8x9zR'></th></span></q></dt></tr></i><div id='8x9zR'><tfoot id='8x9zR'></tfoot><dl id='8x9zR'><fieldset id='8x9zR'></fieldset></dl></div>
          <tfoot id='8x9zR'></tfoot>

          <small id='8x9zR'></small><noframes id='8x9zR'>

            <tbody id='8x9zR'></tbody>
              • <bdo id='8x9zR'></bdo><ul id='8x9zR'></ul>

                  <legend id='8x9zR'><style id='8x9zR'><dir id='8x9zR'><q id='8x9zR'></q></dir></style></legend>
                1. 本文介绍了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, 以粗体打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:String 类型中的方法 format(String, Object[]) 不适用于 下一篇:SwingWorker 没有响应

                  相关文章

                  最新文章

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

                      • <bdo id='dwnV8'></bdo><ul id='dwnV8'></ul>
                    1. <small id='dwnV8'></small><noframes id='dwnV8'>

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