Convert int in decimal To Hex - Android java.lang

Android examples for java.lang:Hex

Description

Convert int in decimal To Hex

Demo Code


//package com.java2s;

public class Main {
    public static String decToHex(int dec) {
        String tempString = Integer.toHexString(dec);
        return tempString.substring(2);
    }/*from   w  w w  .  j  a va 2 s  .  co  m*/
}

Related Tutorials