Clone
Alias:Clone
Output:ArrayList<T>
Creates an array by cloning an element.
Parameter | Type | Required | Position | Default Value | Summary |
---|---|---|---|---|---|
Element | T | ✔ | 1 | The element to clone. | |
Number Times | int | 2 | 1 | The number of times to clone the element. |
Examples​
Example 1​
SCL​
Clone Element: 'hello' Times: 2
Expected Output​
["hello", "hello"]
Example 2​
SCL​
Clone 1 Number: 3
Expected Output​
[1, 1, 1]