From 336991534b18648f45b33813548c8c67d9bc96cc Mon Sep 17 00:00:00 2001 From: Arman H <60225204+armanh3k@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:05:47 +0000 Subject: [PATCH] Fix nullability explanation (#2856) This change fixes the grammar and updates in the nullability concept and related exercise to improve consistency. Co-authored-by: Kah Goh --- concepts/nullability/about.md | 6 +++--- concepts/nullability/introduction.md | 6 +++--- exercises/concept/tim-from-marketing/.docs/introduction.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/concepts/nullability/about.md b/concepts/nullability/about.md index b2443051b..0c12d8b4e 100644 --- a/concepts/nullability/about.md +++ b/concepts/nullability/about.md @@ -2,11 +2,11 @@ In Java, the [`null` literal][null-keyword] is used to denote the absence of a value. -[Primitive variables][primitive-data-types] in java all have a default value and therefore can never be `null`. +[Primitive data types][primitive-data-types] in Java all have a default value and therefore can never be `null`. By convention, they start with a lowercase letter e.g `int`. -[Reference variables][reference-data-types] contain the memory address of an object and can have a value of null. -These variables usually start with an uppercase e.g `String`. +[Reference types][reference-data-types] contain the memory address of an object and can have a value of `null`. +They generally start with an uppercase letter, e.g. `String`. Attempting to assign a primitive variable a value of `null` will result in a compile time error as the variable always holds a default value of the type assigned. diff --git a/concepts/nullability/introduction.md b/concepts/nullability/introduction.md index 82683b4c3..e0b4cff07 100644 --- a/concepts/nullability/introduction.md +++ b/concepts/nullability/introduction.md @@ -2,11 +2,11 @@ In Java, the `null` literal is used to denote the absence of a value. -Primitive data types in java all have a default value and therefore can never be `null`. +Primitive data types in Java all have a default value and therefore can never be `null`. By convention, they start with a lowercase letter e.g `int`. -Reference types contain the memory address of an object can have a value of null. -These variables usually start with an uppercase e.g `String`. +Reference types contain the memory address of an object and can have a value of `null`. +They generally start with an uppercase letter, e.g. `String`. Attempting to assign a primitive variable a value of `null` will result in a compile time error as the variable always holds a primitive value of the type assigned. diff --git a/exercises/concept/tim-from-marketing/.docs/introduction.md b/exercises/concept/tim-from-marketing/.docs/introduction.md index 8d7497357..51ae4574a 100644 --- a/exercises/concept/tim-from-marketing/.docs/introduction.md +++ b/exercises/concept/tim-from-marketing/.docs/introduction.md @@ -4,11 +4,11 @@ In Java, the `null` literal is used to denote the absence of a value. -Primitive data types in java all have a default value and therefore can never be `null`. +Primitive data types in Java all have a default value and therefore can never be `null`. By convention, they start with a lowercase letter e.g `int`. -Reference types contain the memory address of an object can have a value of null. -These variables usually start with an uppercase e.g `String`. +Reference types contain the memory address of an object and can have a value of `null`. +They generally start with an uppercase letter, e.g. `String`. Attempting to assign a primitive variable a value of `null` will result in a compile time error as the variable always holds a primitive value of the type assigned.