Hello all, I was wondering on how I would extract a number out of a String after a specified character. For example, if String s = "22+5+35" , how can I extract and store the numbers 22,5, and 35 in a ArrayList?
Recommended Answers
Jump to PostConvert string to char array, then check each character to see if it is a digit using
Character.isDigit(char c)
OR
Use regex, with the split function.
See Java …
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.