There is a String which is given by a user which is in the format "{{row1,col1},{row2,col2},{row3,col3}}". These coordinates are certain locations which are required to be fill in a matrix i.e. changing the matrix values when the same coordinate is found.
The String could be of any length, but we’ll know how many coords it’ll have.
The problem is I can’t find any fast solution to convert this string into locations. I am trying to use StringTokenizer class, but there’re too many separators.
Can you help me find a better solution for this problem.
Thanks in advance.
Try this,