Java Integer to Hex intToHex(int i)

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

Description

Convert an int to a hex representation.

License

Contributor Agreement License

Parameter

Parameter Description
s A Java int.

Return

A hex representation of the int.

Declaration

public static String intToHex(int i) 

Method Source Code

//package com.java2s;
/*/*from w  w w  . ja v  a  2  s  .  c  o m*/
 *  Copyright (C) 2008 Pingtel Corp., certain elements licensed under a Contributor Agreement.
 *  Contributors retain copyright to elements licensed under a Contributor Agreement.
 *  Licensed to the User under the LGPL license.
 *
 */

public class Main {
    /**
     * Convert an int to a hex representation.
     * 
     * @param s
     *            A Java int.
     * @return A hex representation of the int.
     */
    public static String intToHex(int i) {

        return Integer.toHexString(i);

    }
}

Related

  1. integerToHexString(int value, int minBytes)
  2. intToFixedLengthHex(int value, int length)
  3. intToFixedLengthHexString(int i, int length)
  4. intToHex(int a)
  5. intToHex(int i)
  6. intToHex(int i)
  7. IntToHex(int i, int length)
  8. intToHex(int id)
  9. intToHex(int num)