Java Hex Calculate toHex(int decimalDigit)

Here you can find the source of toHex(int decimalDigit)

Description

to Hex

License

Open Source License

Declaration

public static char toHex(int decimalDigit) 

Method Source Code

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

public class Main {
    public static char toHex(int decimalDigit) {
        return decimalDigit < 10 ? (char) (decimalDigit + '0') : (char) (decimalDigit - 10 + 'A');
    }/*from  w  w  w  .  j  a v a  2s . c om*/
}

Related

  1. toHex(final int value)
  2. toHex(final String input)
  3. toHex(int ch)
  4. toHex(int ch)
  5. toHex(int color)
  6. toHex(int h, int minDigit)
  7. toHex(int i)
  8. toHex(int i)
  9. toHex(int i)