On Fri, 18 Jun 1999, [iso-8859-7] �������� ��������� wrote:

> Hi. I am writing a servlet that gets as input hexademical numbers.
> I would like to ask if it is feasible to transform these hexademical
> values to demical numbers.
> Does anybody know how to do that?

This is not a servlet question.  And I found the answer in five
minutes by looking in Java in a Nutshell.

Anyway, check out the java.lang.Integer class, particularly
parseInt(), it converts strings to ints and can do some conversions
like this, either by using a particular prefix ("0x" indicates hex,
"0" indicates octal), or by specifying the radix as a second argument.
You may need to convert the hex numbers to strings first, and you can
use java.lang.String.valueOf() for that.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to