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 have a question. is it possible to override a
View Tutorial          By: rein at 2010-08-25 07:07:15

2. Hey thnx. Solved my "inconvinience" ;P
View Tutorial          By: Hesam Ossanloo at 2013-12-19 15:13:31

3. really helpfull and gets all the stuff what u want
View Tutorial          By: yash at 2009-10-25 12:28:57

4. Thanks it helped to understand but error occurred
View Tutorial          By: Maya at 2010-11-17 22:08:10

5. Like every other Java recursion example, this exam
View Tutorial          By: Uriah at 2010-05-08 18:59:16

6. very useful. Thx
View Tutorial          By: reddy at 2015-05-07 09:58:19

7. i am getting the following error when i ran this p
View Tutorial          By: nancy kapoor at 2008-10-07 14:26:21

8. I will not contest. Certainly this is extremely im
View Tutorial          By: Bangabee at 2012-11-10 18:17:40

9. #include<iostream>
#include<conio.

View Tutorial          By: XavioR at 2011-01-31 00:53:11

10. thanku very much. it is a good examples for abstr
View Tutorial          By: rajesh at 2010-12-17 10:57:42