troubleshooting Question

String manipulation

Avatar of NoleBoy
NoleBoy asked on
Java
8 Comments1 Solution192 ViewsLast Modified:
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.

Thanks
ASKER CERTIFIED SOLUTION
fivesigmaevent

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros