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

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

 
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.
Hi!

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

https://www.selikoff.net/java-ocp-8-programmer-ii-study-guide/
Errata -section

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

Jan
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 204 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jun 24, 2018 03:16:58.