mirror of
https://github.com/ByteByteGoHq/system-design-101.git
synced 2026-04-02 00:57:24 -04:00
This PR adds all the guides from [Visual Guides](https://bytebytego.com/guides/) section on bytebytego to the repository with proper links. - [x] Markdown files for guides and categories are placed inside `data/guides` and `data/categories` - [x] Guide links in readme are auto-generated using `scripts/readme.ts`. Everytime you run the script `npm run update-readme`, it reads the categories and guides from the above mentioned folders, generate production links for guides and categories and populate the table of content in the readme. This ensures that any future guides and categories will automatically get added to the readme. - [x] Sorting inside the readme matches the actual category and guides sorting on production
31 lines
1.7 KiB
Markdown
31 lines
1.7 KiB
Markdown
---
|
|
title: "Java Collection Hierarchy"
|
|
description: "Explore the Java Collection Framework: interfaces, classes, and usage."
|
|
image: "https://assets.bytebytego.com/diagrams/0240-java-collection.png"
|
|
createdAt: "2024-02-20"
|
|
draft: false
|
|
categories:
|
|
- software-development
|
|
tags:
|
|
- "Java"
|
|
- "Data Structures"
|
|
---
|
|
|
|

|
|
|
|
Are you familiar with the Java Collection Framework?
|
|
|
|
Every Java engineer has encountered the Java Collections Framework (JCF) at some point in their career. It has enabled us to solve complex problems in an efficient and standardized manner.
|
|
|
|
JCF is built upon a set of interfaces that define the basic operations for common data structures such as lists, sets, and maps. Each data structure is implemented by several concrete classes, which provide specific functionality.
|
|
|
|
Java Collections are based on the Collection interface. A collection class should support basic operations such as adding, removing, and querying elements.
|
|
|
|
Through the enhanced for-loop or iterators, the Collection interface extends the Iterable interface, making it convenient to iterate over the elements.
|
|
|
|
The Collection interface has three main subinterfaces: List, Set, and Queue. Each of these interfaces has its unique characteristics and use cases.
|
|
|
|
Java engineers need to be familiar with the Java Collection hierarchy to make informed decisions when choosing the right data structure for a particular problem.
|
|
|
|
We can write more efficient and maintainable code by familiarizing ourselves with the key interfaces and their implementations. We will undoubtedly benefit from mastering the JCF as it is a versatile and powerful tool in our Java arsenal.
|