From 57c5fdbc10b8b769a994931e49880b102196da17 Mon Sep 17 00:00:00 2001 From: Christoph Stade <59069119+chris234567@users.noreply.github.com> Date: Sat, 24 Jun 2023 17:08:36 +0200 Subject: [PATCH 1/2] Update 03ln-inheritance.md --- 03ln-inheritance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03ln-inheritance.md b/03ln-inheritance.md index 99cae42..acd5ff2 100644 --- a/03ln-inheritance.md +++ b/03ln-inheritance.md @@ -417,7 +417,7 @@ class Bottom implements Left, Right { } ``` -The diamond problem describes a name conflict that arises from a class hierarchy, where two implemented classes have the same name. +The diamond problem describes a name conflict that arises from a class hierarchy, where two implemented methods have the same name. In our example, the interfaces `Left` and `Right` add default (different) implementations for `method()`. Use `super.` to access the implementation of a **base class** (here: none given), but use `.super.` to access default methods. From fb2c645960224d2f21b3c08685cc8ee5ee52dd50 Mon Sep 17 00:00:00 2001 From: Christoph Stade <59069119+chris234567@users.noreply.github.com> Date: Sat, 24 Jun 2023 17:20:20 +0200 Subject: [PATCH 2/2] Update 03ln-inheritance.md --- 03ln-inheritance.md | 1 + 1 file changed, 1 insertion(+) diff --git a/03ln-inheritance.md b/03ln-inheritance.md index acd5ff2..9c0da5e 100644 --- a/03ln-inheritance.md +++ b/03ln-inheritance.md @@ -373,6 +373,7 @@ As you can see, interfaces with default methods allow for a very modular and fle # The Diamond Problem +