Java Hex Calculate toHex(int i, String $default)

Here you can find the source of toHex(int i, String $default)

Description

to Hex

License

Open Source License

Declaration

public static String toHex(int i, String $default) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toHex(int i, String $default) {
        return i != -1 ? Integer.toHexString(i) : $default;
    }/* ww w  . j av  a2 s . c  o  m*/

    public static String toHex(int i) {
        return Integer.toHexString(i);
    }

    public static String toHex(long n) {
        return Long.toHexString(n);
    }
}

Related

  1. toHex(int decimalDigit)
  2. toHex(int h, int minDigit)
  3. toHex(int i)
  4. toHex(int i)
  5. toHex(int i)
  6. toHex(int myByte)
  7. toHex(int n)
  8. toHex(int n)
  9. toHex(int n, Boolean bigEndian)