Преобразование из десятичной в шестнадцатеричную 10 Сентябрь 2009 by admin·0 Comments Вы можете преобразовать десятичное в двоичное с использованием трех различных методов, как показано ниже: int i = 42; String hexstr = Integer.toString(i, 16); or String hexstr = Integer.toHexString(i); or (with leading zeroes and uppercase) public class Hex { public static void main(String args[]){ int i = 42; System.out.print (Integer.toHexString( 0x10000 | i).substring(1).toUpperCase()); } } other