Skip to content

Commit

Permalink
Remove collection from array description (#2843)
Browse files Browse the repository at this point in the history
This is to avoid confusion with the term "collection" as used in the Java Collections Framework. Previously, the text referred to arrays as collections, which is inaccurate in Java's formal terminology.

The native Java arrays are not part of the Collections Framework, as they do not implement the `Collection` interface or its subtypes, such as `List`, `Set`, or `Map`. They are simply fixed-size objects that hold elements of the same type.

This change helps prevent misunderstanding and aligns the description with Java's official definitions.
  • Loading branch information
lcsvoj authored Nov 6, 2024
1 parent 1eec3d1 commit b7505e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions concepts/arrays/about.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# About Arrays

In Java, data structures that can hold zero or more elements are known as _collections_.
An **array** is a collection that has a fixed size and whose elements must all be of the same type.
In Java, arrays are a way to store multiple values of the same type in a single structure.
Unlike other data structures, arrays have a fixed size once created.
Elements can be assigned to an array or retrieved from it using an index.
Java arrays use zero-based indexing: the first element's index is 0, the second element's index is 1, etc.

Expand Down
4 changes: 2 additions & 2 deletions concepts/arrays/introduction.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Introduction to Arrays

In Java, data structures that can hold zero or more elements are known as _collections_.
An **array** is a collection that has a fixed size and whose elements must all be of the same type.
In Java, arrays are a way to store multiple values of the same type in a single structure.
Unlike other data structures, arrays have a fixed size once created.
Elements can be assigned to an array or retrieved from it using an index.
Java arrays use zero-based indexing: the first element's index is 0, the second element's index is 1, etc.

Expand Down
4 changes: 2 additions & 2 deletions exercises/concept/bird-watcher/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Arrays

In Java, data structures that can hold zero or more elements are known as _collections_.
An **array** is a collection that has a fixed size and whose elements must all be of the same type.
In Java, arrays are a way to store multiple values of the same type in a single structure.
Unlike other data structures, arrays have a fixed size once created.
Elements can be assigned to an array or retrieved from it using an index.
Java arrays use zero-based indexing: the first element's index is 0, the second element's index is 1, etc.

Expand Down

0 comments on commit b7505e4

Please sign in to comment.