dcsimg
Hex to Decimal Conversion in JAVA
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vikas_sharma
Posted On:   Friday, April 20, 2001 12:09 PM

Hi jGuru,

i want to know if there any API's Available in JAVA to Convert Hex to Decimal and Decimal to Hex. and how i can do the Conversion .

Thx
Vikas

Re: Hex to Decimal Conversion in JAVA

Posted By:   AlessandroA_Garbagnati  
Posted On:   Friday, April 20, 2001 01:08 PM

Hi,


int hex = Integer.parseInt("ff", 16);

String str = Integer.toHexString(255);


add a .toUpperCase() if you want the hex string to be uppercase
About | Sitemap | Contact