I've been looking for a way to format a hex number. Im doing something like this
int startAddress = 0x00491d10;
System.out.print("\n0x" + Integer.toHexString(startAddress));
but it prints out "0x491d10" instead of "0x00491d10". Any easy way to fix this?