Skip to content

Commit a0eced9

Browse files
melonpankahgoh
andauthored
Improve Java array .length property explanation (#2855)
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]>
1 parent f37d6a8 commit a0eced9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

concepts/arrays/about.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ int secondElement = twoInts[1];
4444
Accessing an index that is outside of the valid indexes for the array results in an `IndexOutOfBoundsException`.
4545

4646
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).
47-
The most commonly used property for arrays is its length which can be accessed like this:
47+
The `length` property holds the length of an array.
48+
It can be accessed like this:
4849

4950
```java
5051
int arrayLength = someArray.length;

concepts/arrays/introduction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ int secondElement = twoInts[1];
4444
Accessing an index that is outside of the valid indexes for the array results in an `IndexOutOfBoundsException`.
4545

4646
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).
47-
The most commonly used property for arrays is its length which can be accessed like this:
47+
The `length` property holds the length of an array.
48+
It can be accessed like this:
4849

4950
```java
5051
int arrayLength = someArray.length;

exercises/concept/bird-watcher/.docs/introduction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ int secondElement = twoInts[1];
4646
Accessing an index that is outside of the valid indexes for the array results in an `IndexOutOfBoundsException`.
4747

4848
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).
49-
The most commonly used property for arrays is its length which can be accessed like this:
49+
The `length` property holds the length of an array.
50+
It can be accessed like this:
5051

5152
```java
5253
int arrayLength = someArray.length;

0 commit comments

Comments
 (0)