create map between binary and its equivalent octal code
Map < String , Character > bin_oct_map = new HashMap < > ( ) ; bin_oct_map . put ( "000" , '0' ) ; bin_oct_map . put ( "001" , '1' ) ; bin_oct_map . put ( "010" , '2' ) ; bin_oct_map . put ( "011" , '3' ) ; bin_oct_map . put ( "100" , '4' ) ; bin_oct_map . put ( "101" , '5' ) ; bin_oct_map . put ( "110" , '6' ) ; bin_oct_map . put ( "111" , '7' ) ; int i = 0 ; String octal = " " ; while ( true ) {