The difference between collection and collections.
Collection is an interface under java. util. It is the parent interface of various collection structures. The inherited interfaces mainly include set and list.
Collections is a dedicated static class under java. util. It contains various static methods related to set operations. Provides a series of static methods for searching, sorting, and thread security operations on various sets.
The difference between array and arrays.
1. array class array is the most basic storage structure in Java. Allows you to dynamically create and access Java arrays. The element types must be the same. High efficiency, but the capacity is fixed and cannot be changed dynamically. It cannot determine how many elements actually exist, and length only tells us the size of the array.
2. arrays class. This static class is used to operate arrays and provides static methods such as search, sorting, and replication. Equals (): checks whether two arrays are equal. Array has the same number of elements, and all corresponding elements are equal to each other. Sort (): used to sort arrays. Binarysearch (): Search for elements in the sorted array.