标签:整数转16进制
<span style="font-size:18px;"><strong>public class Test{ public static void main(String [] args){ int i = 60; int a = i & 15; // a = 12 System.out.println( a>9?(char)(a-10+'A') : a ); int num = i >>>4; int n = num & 15; //n = 3 System.out.println(n>9?(char)(n-10+'A') : n); } }</strong></span>
标签:整数转16进制
原文地址:http://blog.csdn.net/yingmengxuepingbao/article/details/44761023