Skip to content

Commit c4d0fe7

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop
2 parents bcc0622 + c9fa3ad commit c4d0fe7

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/annotations/elements.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,20 @@ The method should take no arguments.
2020
}
2121
```
2222

23-
And the return value needs to be one of a few built-in types like `Class`, `String`, `int`, `boolean`, etc.[^fulllist], an `enum`, or an array of one of those.
23+
And the return value needs to be one of a few built-in types like `Class`, `String`, `int`, `boolean`, etc.[^fulllist], an `enum`, another annotation interface, or an array of one of those.
2424

2525
```java,no_run,does_not_compile
2626
enum Priority {
2727
HIGH,
2828
LOW
2929
}
3030
31+
@interface Deadline {
32+
int year();
33+
int month();
34+
int day();
35+
}
36+
3137
class PersonInCharge {}
3238
3339
@interface Todo {
@@ -49,7 +55,10 @@ class PersonInCharge {}
4955
// Enums ✅
5056
Priority priority();
5157
52-
// Other Classes ❌
58+
// Other annotations ✅
59+
Deadline deadline();
60+
61+
// Other classes ❌
5362
PersonInCharge personInCharge();
5463
}
5564
```

src/class_extension/relation_to_encapsulation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ class Airplane {
7272

7373
void bookMany(List<String> passengers) {
7474
for (var passenger : passengers) {
75-
bookOne(passenger);
75+
// Only change
76+
this.passengers.add(passenger);
7677
}
7778
}
7879
}

0 commit comments

Comments
 (0)