We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fffc46 commit 114b784Copy full SHA for 114b784
1 file changed
src/lambdas/method_references.md
@@ -34,6 +34,10 @@ interface Drummer {
34
void drum();
35
}
36
37
+interface Musician {
38
+ void play();
39
+}
40
+
41
class Main {
42
void doDrum() {
43
IO.println("ratatatatat");
@@ -46,7 +50,8 @@ class Main {
46
50
Drummer drummer = this::doDrum;
47
51
drummer.drum();
48
52
49
- Runnable run = drummer::drum;
53
+ Musician musician = drummer::drum;
54
+ musician.play();
55
56
57
```
0 commit comments