[It's not about converting a String
into an Integer
]
I need to take some digits from a String
that is a line by console command.
For Example :
String str = "234 432 22 66 8 44 7 4 3 333";
How can I get every single Integer
value and put them in an array?
The order of digits is not important because the String
could be:
String str = "34 434343 222";
or
String str = " 1 2 3 4 5 6 7";
Also, how can I get digits in these two cases (with one or more whitespace characters):
String str = "2 2 44 566";
and
String str = "2121 23 44 55 6 58";