Minor typo on page 249 (Java OCA 8 Programmer I Study Guide)
posted 1 year ago
At the top of page 249, in the second paragraph, we can read :
The second method, eat(), is overridden in the subclass Eagle ... the return type of the method in Eagle must be a subclass of the return type of the method in Bird. In this example, the return type void is not a subclass of int ...
But, according to the example of page 248, the explanation should be :
In this example, the return type int is not a subclass of void ...
since the return type of eat() is int in Eagle, and void in Bird.