KaKu dhawan

Greenhorn
+ Follow
since Dec 05, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by KaKu dhawan

sohail hussain wrote:

Campbell Ritchie wrote:. . . . The inherited tail length method in Cougar interferes with its being able to implement the interface, which makes three errors. Any more explanation about that, please? . . .


if first method which is overridden is not compiled then same error is propogated  to the next implementing class so others will not compile



This "error propagation" from interface to class is what I was confused about. The error is not self  explanatory. But Thanks for clearing things.
6 months ago


This is 3rd question in the Assessment Test (Page xxxi) from SYBEX Certified Associate Java® SE 8 Programmer I, Study Guide.
Above is the code. The compiler shows error on line 3 and line 7, but not on line no. 5 (as shown in the screenshot).
(choice C)3rd line compiler error is because of illegal restrictive access from public to protected for getTailLength() method, so the compiler error is understandable.
(choice E)7th line compiler error is because we are creating an instance of abstract class , which again is illegal.
But the book says choice D is also correct but I am not getting any compiler error on line 5.
Is this an error in the book or am I missing something here? If it's an error it's not on the errata.
6 months ago
This is the 3rd question of Assessment test from the book "OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide: Exam 1Z0–808" by  Jeanne Boyarsky and Scott Selikof.
Correct answers given are C,D and E.
C and E makes complete sense to me and the respective lines show as error in the IDE but D choice(line number 5) doesn't show as error, and I don't see anything wrong.
What am I missing here?

Thanks
6 months ago
I tried the example on IntellijIDE but I am not getting any compile time error as stated in option D. Please help me understand, if there is actually an error in the Cougar class declaration.
Thanks
6 months ago