java 代码 :十进制:1618801067 转为16进制为:60 7C F1 AB 最后反序 AB F1 7C 60
public class DecimalToHexadecimal { public static void main(String[] args) { int decimal = 1618801067; String hexadecimal = Integer.toHexString(decimal); System.out.println("16进制:" + hexadecimal);
StringBuilder sb = new StringBuilder(hexadecimal);
sb.reverse();
String reversed = sb.toString();
System.out.println("反序:" + reversed);
}
}
// 输出结果: // 16进制:607cf1ab // 反序:abf17c60
原文地址: https://www.cveoy.top/t/topic/bsML 著作权归作者所有。请勿转载和采集!