Java Integer to Hex int2hex(int i)

Here you can find the source of int2hex(int i)

Description

Converts integer digit to heck char.

License

Open Source License

Declaration

public static char int2hex(int i) 

Method Source Code

//package com.java2s;

public class Main {
    public static final char[] HEX_CHARS = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
            'C', 'D', 'E', 'F' };

    /**//from   w  w w  .  java  2  s. com
     * Converts integer digit to heck char.
     */
    public static char int2hex(int i) {
        return HEX_CHARS[i];
    }
}

Related

  1. int2CharHex(int integer)
  2. int2hex(final int a, final StringBuffer str)
  3. int2hex(final int i)
  4. int2hex(int a, StringBuffer str)
  5. int2hex(int i)
  6. int2HexChar(int val)
  7. int2HexChars(final int data)
  8. int2HexString(final int i)
  9. int2HexString(int n)