| Author |
Method Overriding with Object
|
Srinivas Palam
Ranch Hand
Joined: Oct 20, 2005
Posts: 39
|
|
According to the scjp6 book, red colored line should disply Animal, but I am geeting complie error. Please help.
ERROR:
D:\Java>javac UseAnimals.java
UseAnimals.java:19: useAnimals(Horse) in UseAnimals cannot be applied to (Animal
)
ua.useAnimals(animalRefToHorse);
^
1 error
D:\Java>
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
I expect that's because you misspelled the method name in line 6 of your posted code.
|
 |
Srinivas Palam
Ranch Hand
Joined: Oct 20, 2005
Posts: 39
|
|
|
Thank You.
|
 |
 |
|
|
subject: Method Overriding with Object
|
|
|