建筑工程网官方网站,网页维护包括哪些,网站演示网站代码,莆田软件定制开发前些天发现了一个巨牛的人工智能学习网站#xff0c;通俗易懂#xff0c;风趣幽默#xff0c;忍不住分享一下给大家。点击跳转到教程。
用例#xff1a; Long.toHexString(number) 其中 number 是一个long类型参数。 描述#xff1a;
java.lang.Integer.toHexString(…
前些天发现了一个巨牛的人工智能学习网站通俗易懂风趣幽默忍不住分享一下给大家。点击跳转到教程。
用例 Long.toHexString(number) 其中 number 是一个long类型参数。 描述
java.lang.Integer.toHexString() 方法返回为无符号整数基数为16的整数参数的字符串表示形式。以下字符作为十六进制数字0123456789ABCDEF。
声明
以下是java.lang.Integer.toHexString()方法的声明
public static String toHexString(int i) static String toHexString(int i) 参数 i -- 这是一个整数被转换为一个字符串.
返回值
此方法返回的字符串表示的无符号整数参数所表示的值以十六进制基数为16.
实例
下面的例子显示使用的java.lang.Integer.toHexString()方法.
package com.yiibai;import java.lang.*;public class IntegerDemo {public static void main(String[] args) {int i 170;System.out.println(Number i);/* returns the string representation of the unsigned integer valuerepresented by the argument in hexadecimal (base 16) */System.out.println(Hex Integer.toHexString(i));}
}
让我们来编译和运行上面的程序这将产生以下结果
Number 170
Hex aa