Click to See Complete Forum and Search --> : Convert a character of String integer into integer value


UAEU_Student
02-15-2006, 09:32 AM
Hiiiii GUYs...........

I am a new member here ....
I hope to be happy with you

This is my first course in Programming and I have a problem that I can't solve it...

Please if you can help me , I will appreciate that ...

Here are my problem:

1. Convert a character string of integer into integer value without using any java API or method. Use exception handling for erroneous input.

For example, the string "123" should be turned into the number 123 without using the Integer.parseInt() method.



2. Convert an integer value into String object without using any java API or method. Use exception handling for erroneous input.

For example, the number 123 should be turned into the string "123" without using the String.valueOf() method.

Please rebly as soon as you can,, the deadline is on Friday 17, February , 2006

regards,

UAEU_Student

Oak
02-15-2006, 09:50 AM
Every "Java" program requires at least one method (main) in order to run so to solve a programming problem in "Java" without using any "Java" methods is not possible.

I think I know what you really mean though but if I solve it for you it will not help you. Maybe the Integer object can take a string as a constructor (http://java.sun.com/j2se/1.3/docs/api/java/lang/Integer.html#Integer(java.lang.String)) ... or something...

All the best with YOUR homework.

sleven
02-17-2006, 02:13 PM
I like this post. yes, i am also a java student.