-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
26 lines (21 loc) · 720 Bytes
/
Copy pathMain.java
File metadata and controls
26 lines (21 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package decorator;
public class Main {
public static void main(String[] args) {
Display sd = new StringDisplay("Hello World");
Display sb = new SideBorder(sd, '#');
Display fb = new FullBorder(sb);
sd.show();
sb.show();
fb.show();
Display display4 = new SideBorder(
new FullBorder(
new FullBorder(
new SideBorder(
new FullBorder(
new StringDisplay("Hello World")
), '*')
)
), '/');
display4.show();
}
}