Fix typo
This commit is contained in:
parent
ef3f984d8e
commit
5f9cf2c661
@ -11,7 +11,7 @@ public class CheckedCastsUnitTest {
|
|||||||
Animal animal = new Frog();
|
Animal animal = new Frog();
|
||||||
|
|
||||||
//A checked downcast to Mammal is incompatible from Frog because Frog is not a subtype of Mammal.
|
//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)
|
@Test(expected = ClassCastException.class)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user