Java examples for java.lang:int Format
Returns number in 0xABCDEF-Format
//package com.java2s; public class Main { /**//from w w w. j a v a2s . c om * Returns number in 0xABCDEF-Format * * @param n * @return */ public static String printHexNumber(int n) { return "0x" + Integer.toHexString(n).toUpperCase(); } }