• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Charles O'Leary
Ranch Hand
Posts: 175
4
  • 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: 175
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Attachment is from page 173 (Kindle)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36659
475
Eclipse IDE Java VI Editor
  • 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: 175
4
  • 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
Marshal
Posts: 36659
475
Eclipse IDE Java VI Editor
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!