Posted on 2003-02-23
am a beginner Java programmer so bear with me. I have a question about a project I am working on. I want to receive an
integer (max 30 digits) from the user, then count how many odd, even, and zeros was entered. I have the logic down right:
using modulus to determine if odd or even, and using the ASCII code for zero to determine if it is a zero.
My question is do I need to convert the string to an int or leave it as a string. I am a bit puzzled as how this works.
Any help in the form of example code or relative support would be greatly appreciated.