Comment on Tutorial - Converting Numbers to and from Strings using Java By Mashoud



Comment Added by : Doug Whitehead

Comment Added at : 2008-11-29 17:10:43

Comment on Tutorial : Converting Numbers to and from Strings using Java By Mashoud
Good examples. However... I am testing for a Hex value (07 or A0) in a string read from a file. How can I compare a one character string (retrieved with substring) to a constant int hex07 = 0x07 or int hexA0 = 0xA0.
I have tried parse, valueOf, etc. I could get there from bit-wise. But I can't get the String (i byte) to an integer. The parses/valueOf give me NUMBER FORMAT EXCEPTION.

I realize you are not QUESTIONS Central... But I Thought I would try... Doug


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. This does not work in following case :
Cli

View Tutorial          By: Amardeep at 2010-01-20 05:59:21

2. Thanks for this tuto , simple and very useful :)
View Tutorial          By: Firas at 2014-11-24 16:49:07

3. Your solution is really helped me. Thanks for your
View Tutorial          By: Rajakumar at 2010-05-31 06:05:53

4. very nice example
View Tutorial          By: lois at 2010-10-05 23:05:01

5. hey it is really good notes, to give an idea of
View Tutorial          By: Pawan at 2011-03-26 05:17:28

6. I need one help how to update particular column da
View Tutorial          By: santhosh.s at 2015-01-22 15:09:33

7. hi ..

for second code which impleme

View Tutorial          By: Eng at 2009-02-21 03:53:29

8. Its awesome
View Tutorial          By: Ranjitha at 2012-08-02 10:21:59

9. thanks brother i hope this is most important for e
View Tutorial          By: manglesh upadhyay at 2012-09-26 04:40:41

10. I am an MCA student i wanna know whether one can s
View Tutorial          By: RAJU.K at 2009-07-24 02:28:21