Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Event Streams in Action this week in the Java in General 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Sybex OCA Java 8 Study Guide: Chapter 4 #6 Errata?

 
Ranch Hand
Posts: 271
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sybex OCA Java 8 Study Guide: Chapter 4 #6 Errata?  D needs better clarity?  As is, there is no correct answer?  (Choose the "best" answer may be more appropriate possibly.)


Reference
Sybex_Chapter_4_Number_6_Answer_D_Needs_Better_Qualification.png
[Thumbnail for Sybex_Chapter_4_Number_6_Answer_D_Needs_Better_Qualification.png]
 
Charles O'Leary
Ranch Hand
Posts: 271
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Attachment is from page 173 (Kindle)
 
author & internet detective
Posts: 39396
763
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Option D is "You can use access modifiers to allow read access to all methods, but not any instance variables"

This is meant to represent a class like:

 
Charles O'Leary
Ranch Hand
Posts: 271
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Option D:

not any instance variables



Page 173's example shows that FatherDuck

uses private instance variable noise on line 5.



Something like?:  You can use access modifiers to allow read access to all methods, but not any instance variables outside a specific class"
(I did get this answer correct the first time.)  I always wondered if it could be confusing for new programmers, especially to the field?  Has this helped to push the needle a tiny teeny bit on clarity?
 
Jeanne Boyarsky
author & internet detective
Posts: 39396
763
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get it; I understand how it could be clearer. But it isn't wrong.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!