Method of converting Java string into double two-dimensional array
•
Java
WHY
A friend asks for a question in the group. The prototype of the question is as follows:
That is, a string that can be converted into a two-dimensional array of double.
HOW
At first glance, it feels very simple. After implementation, paste the code first according to the Convention:
There are several points to pay attention to in this
1. Replace curly brackets with square brackets first,
2. Using JSON conversion, first convert it into a two-dimensional array of string
3. Then, the value in the array is converted to double
4. The JSON package I use is fastjson
The above is all about the method of converting Java string into double two-dimensional array brought by Xiaobian. I hope you can support more programming tips~
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码