Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Errata OCP Appendix A Chapter 1 Question 19 – public static void toddle(){} - Sybex  RSS feed

 
Greenhorn
Posts: 2
AngularJS Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
 
author & internet detective
Marshal
Posts: 38667
677
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
janne kalliokulju
Greenhorn
Posts: 2
AngularJS Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!