public class Arrays extends Object
Modifier and Type | Method and Description |
---|---|
static char[] |
copyOf(char[] arr,
int len)
Returns a new (@code char[]) of the desired size containing a copy
of the original content.
|
static char[] |
copyOfRange(char[] arr,
int from,
int to)
Copies the specified range of the specified array into a new array.
|
static void |
fill(char[] arr,
int from,
int to,
char ch)
Fills the character array from the starting index to the ending index-1
with the provided (@code char) value.
|
public static char[] copyOf(char[] arr, int len)
arr
- original arraylen
- length of the new arraypublic static void fill(char[] arr, int from, int to, char ch)
arr
- array to be modifiedfrom
- starting indexto
- ending indexch
- value for fillpublic static char[] copyOfRange(char[] arr, int from, int to)
arr
- arrayfrom
- starting indexto
- ending index