@@ -5,7 +5,7 @@ Here's is an implementation of some Design Patterns from scratch :p
5
5
__ What is a Design Pattern ?__
6
6
> A software design pattern is a general reusable solution to a commonly occurring problem within a given context in software design --- Wikipedia
7
7
8
- In Java, Design Patterns are dived into tree parts : * Creational* , * Structural* and * Behavioral* .
8
+ In Java, Design Patterns are divived into tree parts : * Creational* , * Structural* and * Behavioral* .
9
9
10
10
# Pattern Observer
11
11
Code source files are available in the package ` com.patternObsTest ` .
@@ -39,12 +39,12 @@ In Java, Design Patterns are dived into tree parts : *Creational*, *Structural*
39
39
```
40
40
41
41
# Pattern Singleton
42
- Pattern Singleton: one Class, one Instance.
42
+ Pattern Singleton: One Class, one Instance.
43
43
Singleton is one of the Gangs of Four Design patterns and comes in the Creational Design Pattern category.
44
44
There are many implementations of this pattern, but we will implement the Thread Safe one.
45
45
Classes are in the package ` com.Singleton ` ;
46
46
47
- ```Java
47
+ ```java
48
48
49
49
import com.singleton.SingletonThreadSafe;
50
50
@@ -60,7 +60,7 @@ Classes are in the package `com.Singleton`;
60
60
61
61
System.out.println(sing1);
62
62
63
- //What the hell, the two instances have the same reference :o
63
+ //Now check out your console.... What the hell, the two instances have the same reference :o
64
64
}
65
65
}
66
66
```
0 commit comments