Created
April 3, 2018 07:30
-
-
Save Baozi2/5c47446f895dff19242004951039126e to your computer and use it in GitHub Desktop.
java将int转换为指定长度的hex不足的用0补齐
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.format("%08x", int); | |
8即为指定长度 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment