You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adapter/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Consider a captain that can only use rowing boats and cannot sail at all.
40
40
41
41
First we have interfaces `RowingBoat` and `FishingBoat`
42
42
43
-
```
43
+
```java
44
44
publicinterfaceRowingBoat {
45
45
voidrow();
46
46
}
@@ -55,7 +55,7 @@ public class FishingBoat {
55
55
56
56
And captain expects an implementation of `RowingBoat` interface to be able to move
57
57
58
-
```
58
+
```java
59
59
publicclassCaptainimplementsRowingBoat {
60
60
61
61
privateRowingBoat rowingBoat;
@@ -73,7 +73,7 @@ public class Captain implements RowingBoat {
73
73
74
74
Now let's say the pirates are coming and our captain needs to escape but there is only fishing boat available. We need to create an adapter that allows the captain to operate the fishing boat with his rowing boat skills.
Copy file name to clipboardExpand all lines: builder/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Wikipedia says
31
31
32
32
Having said that let me add a bit about what telescoping constructor anti-pattern is. At one point or the other we have all seen a constructor like below:
0 commit comments