Skip to content

Commit

Permalink
Improve Java array .length property explanation (#2855)
Browse files Browse the repository at this point in the history
This is to drop the phrase "most commonly used" from the description of the property, which seems unnecessary.

Co-authored-by: Kah Goh <[email protected]>
  • Loading branch information
melonpan and kahgoh authored Nov 5, 2024
1 parent f37d6a8 commit a0eced9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion concepts/arrays/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ int secondElement = twoInts[1];
Accessing an index that is outside of the valid indexes for the array results in an `IndexOutOfBoundsException`.

Arrays can be manipulated by either calling an array instance's methods or properties, or by using the static methods defined in the `Arrays` class (typically only used in generic code).
The most commonly used property for arrays is its length which can be accessed like this:
The `length` property holds the length of an array.
It can be accessed like this:

```java
int arrayLength = someArray.length;
Expand Down
3 changes: 2 additions & 1 deletion concepts/arrays/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ int secondElement = twoInts[1];
Accessing an index that is outside of the valid indexes for the array results in an `IndexOutOfBoundsException`.

Arrays can be manipulated by either calling an array instance's methods or properties, or by using the static methods defined in the `Arrays` class (typically only used in generic code).
The most commonly used property for arrays is its length which can be accessed like this:
The `length` property holds the length of an array.
It can be accessed like this:

```java
int arrayLength = someArray.length;
Expand Down
3 changes: 2 additions & 1 deletion exercises/concept/bird-watcher/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ int secondElement = twoInts[1];
Accessing an index that is outside of the valid indexes for the array results in an `IndexOutOfBoundsException`.

Arrays can be manipulated by either calling an array instance's methods or properties, or by using the static methods defined in the `Arrays` class (typically only used in generic code).
The most commonly used property for arrays is its length which can be accessed like this:
The `length` property holds the length of an array.
It can be accessed like this:

```java
int arrayLength = someArray.length;
Expand Down

0 comments on commit a0eced9

Please sign in to comment.