Hi my friends: I am just a Java beginner, and have a question for you. If I have a string, for example "12345", how can I change it to real integer without using wrapper class methods such as intValue() and parseInt(). Can I just use cast or something else. Thank you in advance. Haijun
I don't understand why you want to convert a string to an integer, without using either of the two standard methods provided for just that purpose. Sure, you can do it yourself by expanding the string into an array of characters and walking along it converting each one to the appropriate digit, multiplying by the appropriate power of 10 and adding to a total. But that seems crazy when there is a powerful and robust way of doing it provided for free. What is actually preventing you from using the standard methods to do this?