The difference between Collection and Collections: collections

Source: Internet
Author: User

The difference between Collection and Collections: collections


1. java. util. Collection isParent interface of the Collection framework. It provides common interface methods for basic operations on collection objects. The Collection interface has many specific implementations in the Java class library. The Collection interface provides a unified operation mode to maximize various specific sets. Collection
Shortlist
│ Invalid parameter list
│ ├ ArrayList
│ Vector
│ Elastic Stack
The methods contained in the sorted Set include:
 
2. java. util. Collections is a packaging class. It contains various Set OperationsStatic polymorphism Method. SuchCannot be instantiated, LikeToolsTo serve the Java Collection framework. He provides a series of static methods for searching, sorting, and thread security operations on various sets.
1. java. util. Collection isSet Interface. It provides common interface methods for basic operations on collection objects. The Collection interface has many specific implementations in the Java class library. The Collection interface provides a unified operation mode to maximize various specific sets. Collection
Shortlist
│ Invalid parameter list
│ ├ ArrayList
│ Vector
│ Elastic Stack
Collections Set 2 and java. util. Collections are a packaging class. It contains various Set OperationsStatic polymorphism Method. SuchCannot be instantiated, LikeToolsTo serve the Java Collection framework.
The difference between Collection and Collections in java

The difference between Collection and Collections.
Collections is a java. util class that contains various static methods related to set operations.

Collection is an interface under java. util. It is the parent interface of various Collection structures.

Does List, Set, and Map inherit from the Collection interface? List, Set is Map is not

The difference between ArrayList and Vector.

1. Synchronization: the Vector is thread-safe, that is, synchronous, while the ArrayList is not secure or synchronous
2. Data growth: When we need to increase, the Vector grows to the original training by default, while the ArrayList is half of the original growth.

Differences between HashMap and Hashtable

I. Historical Reasons: Hashtable is based on the obsolete Dictionary class, And HashMap is an implementation of the Map interface introduced by Java 1.2.

2. Synchronization: Hashtable is thread-safe, that is, synchronous, while HashMap is not secure or synchronous.

3. value: Only HashMap allows you to use a null value as the key or value of a table entry.

Source (luofeng113.javaeye.com/blog/219391)

What is the difference between Collection and Collections?

Collection is the upper-level interface of the Collection class. Collections is a help class for the Collection class. It provides a series of static methods for searching, sorting, and thread-safe operations on various sets.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.