Hi!
I'm building a spreadsheet in Java.
I want to read a string and read the integers in it to do calculations.
Such as =2+(3*5)/4
Is there any method in string class to get integers.
kaushalya_uom
0
Newbie Poster
Recommended Answers
Jump to PostI'm not sure if this would work, but you could find out the length of the String and use a loop with the charAt method in the String class. Then you could try to Typecast each char to type Integer. If no exceptions are thrown you know it is an …
All 3 Replies
Fuze
0
Newbie Poster
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
kaushalya_uom
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.