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?
godzab
0
Junior Poster in Training
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.
All 3 Replies
Reply to this topic
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.