Skip to content

Instantly share code, notes, and snippets.

@Baozi2
Created April 3, 2018 07:30
Show Gist options
  • Save Baozi2/5c47446f895dff19242004951039126e to your computer and use it in GitHub Desktop.
Save Baozi2/5c47446f895dff19242004951039126e to your computer and use it in GitHub Desktop.
java将int转换为指定长度的hex不足的用0补齐
String.format("%08x", int);
8即为指定长度
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment