Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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
Posts: 39129
723
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
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!