Ok, so I have the following string
String test= "0, 1, 3, 2, 2, 1, 1, 4, 2, 5, 1, 1, 0, 1, 241";
As you can see the largest value is the last one (241). I need to find a way to get the place of this String, not the number, so I need the result to be 15 (since 241 is the 15th number in the string, and the largest number in the row.
Another example
String test= "0, 1, 3, 2, 2, 1, 1, 4, 30, 5, 1, 1, 0, 1, 5";
Here the result should be 9 (since the highest number is on the 9th place in the string. But I have no idea how to do this, can anyone give me a good start?
.
stackoverflow.comm
No comments:
Post a Comment