<bdo id='A8MeF'></bdo><ul id='A8MeF'></ul>

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

  • <legend id='A8MeF'><style id='A8MeF'><dir id='A8MeF'><q id='A8MeF'></q></dir></style></legend><tfoot id='A8MeF'></tfoot>

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

        如何从 Java 中的十进制整数中获取十六进制值?

        How to get a hex value from a decimal integer in Java?(如何从 Java 中的十进制整数中获取十六进制值?)
        <i id='Anuyj'><tr id='Anuyj'><dt id='Anuyj'><q id='Anuyj'><span id='Anuyj'><b id='Anuyj'><form id='Anuyj'><ins id='Anuyj'></ins><ul id='Anuyj'></ul><sub id='Anuyj'></sub></form><legend id='Anuyj'></legend><bdo id='Anuyj'><pre id='Anuyj'><center id='Anuyj'></center></pre></bdo></b><th id='Anuyj'></th></span></q></dt></tr></i><div id='Anuyj'><tfoot id='Anuyj'></tfoot><dl id='Anuyj'><fieldset id='Anuyj'></fieldset></dl></div>
      2. <legend id='Anuyj'><style id='Anuyj'><dir id='Anuyj'><q id='Anuyj'></q></dir></style></legend>
          <bdo id='Anuyj'></bdo><ul id='Anuyj'></ul>

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

                <tbody id='Anuyj'></tbody>

                  <tfoot id='Anuyj'></tfoot>
                  本文介绍了如何从 Java 中的十进制整数中获取十六进制值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我不知道如何从 Java 中的整数值生成十六进制0x83"字符.

                  I don't know how to generate a hex "0x83" character from an integer value in Java.

                  我需要一个0x83"值来表示西里尔字母中的一个字母(该字母:),以便将它(该字母)发送到我的打印机.当使用我的转换器(如下)将 131(十进制的 0x83)转换为十六进制时,我得到三个数字:0x31、0x33 和 0x31.

                  I need a "0x83" value to represent a letter in the Cyrillic alphabet (this letter: ), in order to send it (the letter) to my printer. When converting 131 (0x83 in decimal) into hex with my converter (below) I get three numbers: 0x31, 0x33 and 0x31.

                  public String toHex(String arg) {
                      return String.format("%x", new BigInteger(arg.getBytes()));
                  }
                  

                  我需要从这个转换中得到 0x83.

                  I need to get 0x83 from this conversion.

                  推荐答案

                  如果你正在尝试将整数 131 转换为十六进制字符串,你可以试试

                  If you are trying to convert integer 131 to a hex string, you can try

                  Integer.toHexString( 131 )
                  

                  它将以字符串形式返回83".

                  It will return "83" as String.

                  这篇关于如何从 Java 中的十进制整数中获取十六进制值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                        <tbody id='e569M'></tbody>
                      <tfoot id='e569M'></tfoot>

                      1. <legend id='e569M'><style id='e569M'><dir id='e569M'><q id='e569M'></q></dir></style></legend>
                      2. <small id='e569M'></small><noframes id='e569M'>

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