Java Hex Calculate toHexString(int i)

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

Description

to Hex String

License

Open Source License

Declaration

public static String toHexString(int i) 

Method Source Code

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

public class Main {
    public static String toHexString(int i) {
        String hex = Integer.toHexString(i);
        if (hex.length() == 1) {
            return "0" + hex;
        } else {//  w  ww . java  2 s  . co  m
            return hex;
        }
    }
}

Related

  1. toHexString(int i)
  2. toHexString(int i)
  3. toHexString(int i)
  4. toHexString(int i)
  5. toHexString(int i)
  6. toHexString(int i, int digits)
  7. toHexString(int input)
  8. toHexString(int iValue)
  9. toHexString(int n)