clear Summary Clears the array by removing all elements from the array. Usage public void clear() Description Clears the array by removing all elements from the array. This method mutates the array. Examples Basic Usage 123456import System; int[] arr = [ 1, 2, 3 ];Console.log(arr.toString()); // "1,2,3"arr.clear();Console.log(arr.toString()); // "" Share HTML | BBCode | Direct Link