Why is the number of elements in a list referred to as "size", while the length of an array referred to as "length"?
package com.mycompany.javatest;
import java.util.*;
public class JavaTest {
public static void main(String[] args) {
List<String> stringList = new ArrayList<String>();
stringList.add("one");
stringList.add("two");
stringList.add("three");
System.out.println("Size of list is: " + stringList.size());
String[] stringArray = {"one", "two", "three"};
System.out.println("Length of array is: " + stringArray.length);
}
}