Re: Binary to Hexadecimal Conversion
- From: "Daniel Dyer" <"You don't need it">
- Date: Sat, 30 Dec 2006 12:34:21 -0000
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.
--
Daniel Dyer
https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
.
- Follow-Ups:
- Re: Binary to Hexadecimal Conversion
- From: lei
- Re: Binary to Hexadecimal Conversion
- References:
- Binary to Hexadecimal Conversion
- From: lei
- Re: Binary to Hexadecimal Conversion
- From: lei
- Binary to Hexadecimal Conversion
- Prev by Date: Re: Split group?
- Next by Date: Exception thrown & Failure in loading T2 native library db2jcct2 while connecting to db2/400 through java
- Previous by thread: Re: Binary to Hexadecimal Conversion
- Next by thread: Re: Binary to Hexadecimal Conversion
- Index(es):