search
HomeJavaJavaBaseWhat is a collection in java

What is a collection in java

Nov 11, 2019 pm 01:22 PM
java

What is a collection in java

The collection class is stored in the java.util package.

There are three main types of collections: set (set), list (list) and map (mapping). (Recommended study: java course)

Collections store references to objects, not the objects themselves. So we call the objects in the collection the references to the objects in the collection.

#To put it simply: a collection is a container for data, to be precise, it is a container for data object references.

Main structure diagram of Java collection framework

What is a collection in java

From the analysis of the diagram:

1. Collections are mainly divided into two interfaces: Collection and Map.

2. Collection is inherited by List and Set respectively.

3. List is implemented by AbstractList, and then Divided into 3 subclasses, ArrayList, LinkList and Vector

4. Set is implemented by AbstractSet, which is further divided into 2 subclasses, HashSet and TreeSet

5. Map is implemented by AbstractMap, which is further divided into 2 subclasses, HashMap and TreeMap

6. Map is implemented by Hashtable

The above is the detailed content of What is a collection in java. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft