|
|
|
|
99
|
|
99
|
|
100
|
-
|
100
|
-
|
101
|
# Part 7.1 - Create `MyCohort` singleton
|
101
|
# Part 7.1 - Create `MyCohort` singleton
|
102
|
-* **Note:** The creation of this class will demonstrate an implementation of [singleton design pattern](https://www.journaldev.com/1377/java-singleton-design-pattern-best-practices-examples).
|
|
|
|
|
102
|
+* **Note:** The creation of this class will demonstrate an implementation of [singleton design pattern](https://www.journaldev.com/1377/java-singleton-design-pattern-best-practices-examples#eager-initialization).
|
103
|
* Create a `MyCohort` class.
|
103
|
* Create a `MyCohort` class.
|
104
|
* The class should be a subclass of the `People` class.
|
104
|
* The class should be a subclass of the `People` class.
|
105
|
* The class should _statically instantiate_ a `final` field named `INSTANCE` of type `MyCohort`.
|
105
|
* The class should _statically instantiate_ a `final` field named `INSTANCE` of type `MyCohort`.
|