We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3c5aa4 commit 9f829bfCopy full SHA for 9f829bf
Constructors/PrivateConstructor.java
@@ -10,6 +10,7 @@ private Person() {
10
11
// Factory method to provide the users with instances
12
static public Person getInstance() {
13
+ // to ensure only one instance is created
14
if (name == null)
15
name = new Person();
16
0 commit comments