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. thank you, this best for student like us,
View Tutorial          By: Srinath at 2012-05-12 15:04:03

2. i want to say only one thing

great

View Tutorial          By: ashish at 2009-06-09 21:36:45

3. Simply explained theory.......
Thanx......!

View Tutorial          By: Priya at 2013-03-03 14:42:05

4. //Program of Method Overloading with Runtime Value
View Tutorial          By: Subhojit Das at 2014-10-09 07:31:20

5. Thank you for the tutorial. I want to create a cat
View Tutorial          By: Lue at 2012-07-09 10:40:08

6. I am very comfortable with this example, its very
View Tutorial          By: Inam at 2010-11-07 03:04:46

7. Thanks for the info
View Tutorial          By: info at 2010-01-31 12:17:58

8. I am wanting to use a Honeywell 4600g handheld sca
View Tutorial          By: bugdrvr1970 at 2012-01-25 17:27:43

9. Thanx!!!!....
It helped me to startup with

View Tutorial          By: RAJITHA REDDY at 2011-03-01 02:47:03

10. I am new to J2ME but this was really help full and
View Tutorial          By: Subhash at 2013-05-05 08:57:38