Java - Decimal To Hexadecimal

Description

Decimal To Hexadecimal

Demo

public class Main {

  public static void main(String[] args) {
    int number = 10;
    String hex = Integer.toHexString(number);
    System.out.println("Hex value is " + hex.toUpperCase());
  }/*  ww  w  . j  a  v  a2 s . c  o  m*/
}

Related Topic