Re: Binary to Hexadecimal Conversion
- From: "Daniel Dyer" <"You don't need it">
- Date: Sat, 30 Dec 2006 15:33:26 -0000
On Sat, 30 Dec 2006 14:13:50 -0000, lei <m_de_robles@xxxxxxxxx> wrote:
Daniel Dyer wrote:On Sat, 30 Dec 2006 09:31:44 -0000, lei <m_de_robles@xxxxxxxxx> wrote:
> you can also suggest for improvements..thanks!
It could be so much simpler:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#parseInt(java.lang.String,
int)
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#toHexString(int)
Everything after reading the input could be replaced with this one line:
Integer.toHexString(Integer.parseInt(input, 2));
Dan.
I can't use it. The idea is to create your own toHexString.
OK, that wasn't immediately clear.
Dan.
--
Daniel Dyer
https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
.
- References:
- Binary to Hexadecimal Conversion
- From: lei
- Re: Binary to Hexadecimal Conversion
- From: lei
- Re: Binary to Hexadecimal Conversion
- From: Daniel Dyer
- Re: Binary to Hexadecimal Conversion
- From: lei
- Binary to Hexadecimal Conversion
- Prev by Date: Re: newbie: which IDE to choose?
- Next by Date: Re: Binary to Hexadecimal Conversion
- Previous by thread: Re: Binary to Hexadecimal Conversion
- Next by thread: Re: Binary to Hexadecimal Conversion
- Index(es):
Relevant Pages
|
|