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 PostMostly likely he'll need to use Scanner or some regex parsing, because getting the numbers from the string is only the smallest part of writing an expression parser.
Edit: As far as trying the cast to Integer, it wouldn't work - you can't cast a char to an Integer …
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.