arr.length;
let coolCars = ['ford', 'chevy'];
//to find length, use the array's built in method
let length = coolCars.length;
//length == 2.
// Use this function
public void increaseSize() {
String[] temp = new String[original.length + 1];
for (int i = 0; i < original.length; i++){
temp[i] = original[i];
}
original = temp;
}
int size = arr[].length;
// length can be used
// for int[], double[], String[]
// to know the length of the arrays.
String[] cars = {"Volvo", "BMW", "Ford", "Mazda"};
System.out.println(cars[0]);
// Change elements in array
cars[0] = "Opel";
System.out.println(cars[0]);
// Length of array
System.out.println(cars.length);
// Loop through array
for (int i = 0; i < cars.length; i++) {
System.out.println(cars[i]);
}
int[] num = new int[5];