I just started studying for the OCP exam, and I am reading
OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide (Sybex)
I remember from the OCA exam that if the parent class has a non-static method, and the child class tried to override this with the static added then a compile error is generated.
Review Question 19 in Sybex Chapter 1,
says the following:
Which of the following can be inserted to override the superclass method? (Choose all that
And for option D it has this answer:
D compiles but is not an override because it is
I implemented the exact same example as above in Eclipse, and I still get a compiler error. Why does SYBEX says as an answer that D compiles??
is it a book mistake?