Hi, I have a problem and forgive me if this sounds like a stupid question but I'm not really a good programmer. Ok, this is my problem. Say you have a string and you would like to pull out integers from the string what do you do?
String question = "I have 20 different textbooks in my bag but you have 4" or
String order = "Time take :11, jumps: 12,3,456,43,23,56"
How do you input the jumps into a 2d array. PLEASE HELP
Jump to Post
do you know beforehand how the string object will look like? and with this, I mean: do you know before running the application at which position there will be (an) integer(s)?
otherwise, it might be quite tricky, you'll have to check char by char whether it's a digit, …
All 6 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.