Collection of java float string extraction methods and java Collection
This method converts the string into a new character array.
String str = "abcdefg ";
Char a [];
A = str. toCharArray ();
You can also use the following methods:
GetChars
Public void getChars (int srcBegin,
Int srcEnd,
Char dst [],
Int dstBegin)
Copy the character from the string to the destination character array.
The first character to be copied is at the index srcBegin; the last character to be copied is at the index srcEnd-1 (so the total number of characters to be copied is srcEnd-srcBegin ). The characters to be copied to the dst sub-array start with index dstBegin and end with index:
Dstbegin + (srcEnd-srcBegin)-1
Parameters:
SrcBegin-index of the first character in the string to be copied.
SrcEnd-index of the last character in the string to be copied.
Dst-destination array.
DstBegin-start offset in the target array.
String str = "abcdefg ";
Char a [];
Str. getChars (0, str. length (), a, 0 );
Writing is a bit messy, but careful analysis is still very interesting.