Copy part of a string into a char array:
char[] String |
The getChars() method transfers characters from a string to a char array.
public |
|
Parameter |
Description |
|
start |
“This parameter is mandatory. It indicates the position in the string where the copying of characters should start.” |
|
end |
“This parameter is mandatory. It indicates the position in the string after the last character to be copied.” |
|
destination |
“This parameter is mandatory. It refers to the array to which the characters will be copied.” |
|
position |
“This parameter is mandatory. It indicates the position in the destination array where the copied characters will be written.” |
|
Return: |
None |
|
Throws: |
IndexOutOfBoundsException may occur under these conditions:
|
|
Java version: |
Any |