class ToHex
{
public static void main(String[] args)
{
toHex1(60);
}
public static void toHex1(int num){
StringBuffer sb= new StringBuffer();
for(int x=0;x<8;x++){
int temp=num&15;
if(temp>9){
//System.out.println((char)(temp-10+'A'));
sb.append((char)(temp-10+'A'));
}else{
//System.out.println(temp);
sb.append(temp);
}
num = num>>>4;
}
System.out.println(sb.reverse());
}
}
{
public static void main(String[] args)
{
toHex1(60);
}
public static void toHex1(int num){
StringBuffer sb= new StringBuffer();
for(int x=0;x<8;x++){
int temp=num&15;
if(temp>9){
//System.out.println((char)(temp-10+'A'));
sb.append((char)(temp-10+'A'));
}else{
//System.out.println(temp);
sb.append(temp);
}
num = num>>>4;
}
System.out.println(sb.reverse());
}
}