static String toHex(int n) {
Deque<Character> stack = new LinkedList<>();
while (n != 0) {
int one = n % 16;
n /= 16;
if (one < 10)
one += '0';
else
one += 55;
stack.push((char)one);
}
String res = "";
for (char c : stack) {
res += c;
}
return res;
}
最初雨叶_梦