diff --git a/core-java-modules/core-java-exceptions-3/src/test/java/com/baeldung/exceptions/classcastexception/CheckedCastsUnitTest.java b/core-java-modules/core-java-exceptions-3/src/test/java/com/baeldung/exceptions/classcastexception/CheckedCastsUnitTest.java index 8e62a10e2f..7fac000fa8 100644 --- a/core-java-modules/core-java-exceptions-3/src/test/java/com/baeldung/exceptions/classcastexception/CheckedCastsUnitTest.java +++ b/core-java-modules/core-java-exceptions-3/src/test/java/com/baeldung/exceptions/classcastexception/CheckedCastsUnitTest.java @@ -11,7 +11,7 @@ public class CheckedCastsUnitTest { Animal animal = new Frog(); //A checked downcast to Mammal is incompatible from Frog because Frog is not a subtype of Mammal. - Mammal mammal1 = (Mammal) animal; + Mammal mammal = (Mammal) animal; } @Test(expected = ClassCastException.class)