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



Subscribe to Tutorials

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. I running this on localhost offline and getting er
View Tutorial          By: nitisha at 2011-05-14 09:18:16

2. FileOutputStream will create the file if it does n
View Tutorial          By: Peter at 2012-02-07 13:25:16

3. its working... thanks.. thank you very much...!!!!
View Tutorial          By: Viswanathan at 2008-08-18 06:54:09

4. plz give me for css coding
View Tutorial          By: anil mani at 2008-04-19 01:20:06

5. Can you please send me the full code in sending an
View Tutorial          By: jen at 2008-05-28 00:22:21

6. Your example is clear crisp and very helpful..
View Tutorial          By: sridhar at 2009-08-06 08:41:14

7. Dear author
u missed check condition for 0(

View Tutorial          By: Maroof Ahmad at 2012-03-28 14:59:53

8. i need help for my study, i need an algorithm for
View Tutorial          By: Vincent at 2011-08-17 13:37:52

9. i want divide the jsf page to two pages
pl

View Tutorial          By: habib_fci at 2008-06-11 06:05:29

10. nice and simple information...............
View Tutorial          By: sengadu at 2010-07-24 07:43:29