Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Returns a string representation of the integer argument as an
     * unsigned integer in base 16. The string will be uppercase
     * and will have a leading '0x'.
     *
     * @param value the integer value
     *
     * @return the hex string representation
     */
    public static String toHexString(final int value) {
        return "0x" + Integer.toHexString(value).toUpperCase();
    }
}