• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Oracle Press, Kathy and Bert's Benefits2 Question

 
Ranch Hand
Posts: 95
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers!
I post in attachment a question whose result I cannot fully understand.

In particular the third check point (option E):

Class Benefits2 uses some of the Java API outside of java.lang




My humble point of view is that Benefits2 uses an int for counter and a String for bene and anything else.
In TestBenes Benefits2 IS USED BY a java.util.ArrayList to populate itself. Benefits2 is used by ArrayList and doesn't use ArrayList.
So option E should not be true.
Am I missing something?
Benefits2.png
[Thumbnail for Benefits2.png]
 
Marshal
Posts: 79177
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you might be right there.
 
Daniele Barell
Ranch Hand
Posts: 95
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I think you might be right there.



Hi Campbell,
Thank you.

Do you know if there's a way to let it know to Oracle/Mc Graw Hill or direclty to Kathy Sierra/Bert Bates?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which book is it? THere's an errata thread for the K&B 7 book. I suspect you are actually reading the OCA 8 (since you are also reading my OCA 8 book).

Regardless, can you post a question number. And a chapter number or that it is from the mock exam.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't know those questions were visible yet.
I think it means that nothing requiring an import is used by the Benefits class; the array list is only used in Benefits2. I think the answer “no” is correct for E, but maybe it isn't worded clearly. I don't know, but it might still be possible to change the question.
 
Daniele Barell
Ranch Hand
Posts: 95
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Which book is it? THere's an errata thread for the K&B 7 book. I suspect you are actually reading the OCA 8 (since you are also reading my OCA 8 book).

Regardless, can you post a question number. And a chapter number or that it is from the mock exam.



Hi Jeanne,
I'm reading about OCA 8 as you supposed.
This question is cought by the interactive quiz, not by the book directly.
As Campbell said the exam application didn't show a unique id of the question, and I composed the test mixing some cerctification-objectives.
But I detected a little more de-randomizing questions and find out it's the 12th question belonging to the "Java Basics" group.
That's the best coodinates I'm able to give.

 
reply
    Bookmark Topic Watch Topic
  • New Topic