java.lang.Long.toHexString()


java.lang.Long.toHexString()

package com.codingdict;



import java.lang.*;



public class LongDemo {



   public static void main(String[] args) {



      long l = 220;

      System.out.println("Number = " + l);



      /* returns the string representation of the unsigned long value

         represented by the argument in hexadecimal (base 16) */

      System.out.println("Hex = " + Long.toHexString(l));

   }  

}