From a0eced9505e6bd85ee1632891d72dd7f2cec2c79 Mon Sep 17 00:00:00 2001 From: melonpan <73855155+melonpan@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:17:49 -0300 Subject: [PATCH] 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 --- concepts/arrays/about.md | 3 ++- concepts/arrays/introduction.md | 3 ++- exercises/concept/bird-watcher/.docs/introduction.md | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/concepts/arrays/about.md b/concepts/arrays/about.md index b7588364b..8f87bd4db 100644 --- a/concepts/arrays/about.md +++ b/concepts/arrays/about.md @@ -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; diff --git a/concepts/arrays/introduction.md b/concepts/arrays/introduction.md index 218b91869..7d2db108e 100644 --- a/concepts/arrays/introduction.md +++ b/concepts/arrays/introduction.md @@ -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; diff --git a/exercises/concept/bird-watcher/.docs/introduction.md b/exercises/concept/bird-watcher/.docs/introduction.md index c8b1bddbc..0c3f689a8 100644 --- a/exercises/concept/bird-watcher/.docs/introduction.md +++ b/exercises/concept/bird-watcher/.docs/introduction.md @@ -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;