I don't know whether it's an optimised solution.

1. Using String(Char[] value) to convert char into String object.
2. Then Convert String Object to Long or Integer Object by using
    Long or Integer Wrapper Class. e.g. Integer.valueOf(String str).
3. Then using Integer.toHexString(int num) convert that into Hexadecimal.
    num = Integer.intValue();

    The same way you can use Long also.

Cheers

Babu

----- Original Message -----
From: Usha Sree Y <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 29, 1999 11:13 AM
Subject: Conversion to Hexadecimal


could someone tell me how to convert a char or byte to a hexadecimal
value in Java.
i am sorry if this is off-topic.
I have gone through the documentation and found some example but could
not  understand it.

___________________________________________________________________________
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

___________________________________________________________________________
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