mesfex Asked:2020-09-29 21:17:51 +0000 UTC2020-09-29 21:17:51 +0000 UTC 2020-09-29 21:17:51 +0000 UTC 如何以十六进制显示十进制数? 772 我们有数字 10。通过String.format("%#x",10)我们得到0xa输出,如何使输出为0x0A java 1 个回答 Voted Best Answer Aziz Umarov 2020-09-29T22:22:05Z2020-09-29T22:22:05Z 可能适合 package test; import java.io.IOException; public class App { public static void main(String[] args) throws IOException { System.out.println(String.format("0x%02X", 10)); } }
可能适合