Forums Register Login
Errata OCP Appendix A Chapter 1 Question 19 – public static void toddle(){} - Sybex

Have just started preparing for the OCJP -certification and have gone through the first chapter's reviews. Wondering about the question 19 and its suggestions that

should compile.

According to my understanding non-static nested class may not have statically declared member variables nor methods and therefore the wording of the answer, I think,
should be changed into "D does not compile". Or have I missed something?

Br Janne

Welcome to CodeRanch! I added the publisher of the book to your subject. There are multiple OCP books so this helps us know which one it goes with.

You are correct that Option D doesn't compile. This is in the errata and was originally reported last year.

Sorry. I tried to search for it, but couldn't find. Also checked the problem at

Errata -section

and as it wasn't there so decided to submit a post. Thanks anyway.


This thread has been viewed 233 times.

All times above are in ranch (not your local) time.
The current ranch time is
Sep 20, 2018 22:05:24.