when should you specify list size java code example
Example: list size in java
Collection<Object> list = new ArrayList<>();
list.size();
// All collections use size()
// array use array. length
Collection<Object> list = new ArrayList<>();
list.size();
// All collections use size()
// array use array. length