There was an error while loading. Please reload this page.
int[] ia = {0, 1, 2, 3, 4, 5, 6, 7}; println(ia.length); // Prints "8" ia = contract(ia, 5); println(ia.length); // Prints "5"
Decreases the size of an array. The required newSize parameter provides precise control over the decrease in size.
contract(array, newSize)
Parâmetros array booleans[], bytes[], chars[], ints[], floats[], or Strings[]
newSize positive int: new size for the array
Array (the same datatype as the input)
Web & Applicações
expand()