docs: updates to several patterns

This commit is contained in:
Ilkka Seppälä
2024-05-28 19:46:39 +03:00
parent 4652842c94
commit 584e949714
70 changed files with 347 additions and 479 deletions
+3 -4
View File
@@ -99,9 +99,9 @@ public abstract class ActiveCreature {
}
```
We can see that any class that will extend the ActiveCreature class will have its own thread of control to invoke and execute methods.
We can see that any class that will extend the `ActiveCreature` class will have its own thread of control to invoke and execute methods.
For example, the Orc class:
For example, the `Orc` class:
```java
public class Orc extends ActiveCreature {
@@ -109,11 +109,10 @@ public class Orc extends ActiveCreature {
public Orc(String name) {
super(name);
}
}
```
Now, we can create multiple creatures such as Orcs, tell them to eat and roam, and they will execute it on their own thread of control:
Now, we can create multiple creatures such as orcs, tell them to eat and roam, and they will execute it on their own thread of control:
```java
public class App implements Runnable {