diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Animal.java b/core-java/src/main/java/com/baeldung/java/reflection/Animal.java index 2107c7522d..3f36243c29 100644 --- a/core-java/src/main/java/com/baeldung/java/reflection/Animal.java +++ b/core-java/src/main/java/com/baeldung/java/reflection/Animal.java @@ -18,10 +18,6 @@ public abstract class Animal implements Eating { this.name = name; } - public String makeSound() { - return getSound(); - } - protected abstract String getSound(); } diff --git a/core-java/src/test/java/com/baeldung/java/reflection/ReflectionTest.java b/core-java/src/test/java/com/baeldung/java/reflection/ReflectionTest.java index 6639096ad1..a12a2f205f 100644 --- a/core-java/src/test/java/com/baeldung/java/reflection/ReflectionTest.java +++ b/core-java/src/test/java/com/baeldung/java/reflection/ReflectionTest.java @@ -124,7 +124,7 @@ public class ReflectionTest { assertEquals(4, actualMethods.size()); assertTrue(actualMethods.containsAll(Arrays.asList("getName", - "setName", "getSound", "makeSound"))); + "setName", "getSound"))); } @Test