• 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

Questions/errata for Sybex OCP 17 Study Guide

 
Ranch Hand
Posts: 90
5
  • Number of slices to send:
    Optional 'thank-you' note:
Hi,

For online question tb864585.JaSE17SG.c09.15, I would suggest removing <Integer> on the left side and moving the type on the right side of the assignment.
This makes it clearer in my opinion that the blank refers to both the main type and the generics part.

Guillaume
 
Guillaume Bailly
Ranch Hand
Posts: 90
5
  • Number of slices to send:
    Optional 'thank-you' note:
Hi,

Question tb864585.JaSE17SG.c04.19 in the online test bank makes use of a static method in Arrrays (with three "r")
This is a minor concern, but I still wanted to add it for completeness.

Guillaume
 
Greenhorn
Posts: 4
  • 3
  • Number of slices to send:
    Optional 'thank-you' note:
Thank you so much.
I also get confused, because I think option b is a correct overloading, but not overriding.

By the way, Jeanne; where did you wrote that long explanation?. I'd be interested on read it. Thanks


Jeanne Boyarsky wrote:

Guillaume Bailly wrote:Hi,

Spoiler alert, this is a question about the review questions at the end of chapter 9.

I don't really get why option B in question 7 is seen as valid (pages 524 and 940).
After all, if I were to declare Alpaca as an interface, this wouldn't be true.

Can someone enlighten me?



I wrote a whole long explanation of why and then got to the end and realized it was wrong. Logged as an errata.

The quick test is to use an @Override tag and see if it is allowed. It is not.

 
Marshal
Posts: 79394
377
  • Number of slices to send:
    Optional 'thank-you' note:
VM: Welcome to the Ranch
 
Val Martinez
Greenhorn
Posts: 4
  • Number of slices to send:
    Optional 'thank-you' note:

Campbell Ritchie wrote:VM: Welcome to the Ranch

Thanks Ritchie

Another question.
I become a bit confused while studying chapter 10.

In the table 10.10, (page 571) where most of Collectors methods are shown, the groupingBy says it reutns a Map<k, List<T>>.  And that is not totally true. For example,  you can program this



and each value of the map collected will be a Set (and not a List).
So, I would appreciate to use other Generic Type or info to describe more exactly the returned type of each groupingBy version.

Thank you.
 
Saloon Keeper
Posts: 15608
366
  • Number of slices to send:
    Optional 'thank-you' note:
One of the overloads of groupingBy() DOES return a Map<K, List<T>>. That there exist other overloads that return something different doesn't make the former fact any less true.

If that is the only overload that is listed in the table, then I agree that it seems arbitrary to only list that return value, and not others as well.
 
Val Martinez
Greenhorn
Posts: 4
  • Number of slices to send:
    Optional 'thank-you' note:

Stephan van Hulst wrote:... If that is the only overload that is listed in the table..


Exactly!, that's the thing.

Cheking the official API helped me to understand there were others versions/overloads that return different types (ie,  groupingBy )
 
Master Rancher
Posts: 4905
74
  • Number of slices to send:
    Optional 'thank-you' note:
None of the overloads returns Map<K,List<T>>.

One does return a  Collector<T,?,Map<K,List<T>>>
 
Stephan van Hulst
Saloon Keeper
Posts: 15608
366
  • Number of slices to send:
    Optional 'thank-you' note:
Yes, sorry, that's what I meant.
 
Greenhorn
Posts: 5
  • Number of slices to send:
    Optional 'thank-you' note:
Hi all.

I'm studiing for exam number 1Z0-829, using Sybex OCP 17 Study Guide.
I've already read the errata list of the book, but I still have concerns.

For example : Chapter 1, review questions page 55, question 5.
If an object is eligible for GC after line 13 (answer A), why saying it is also eligible for GC after line 14 is wrong (answer B) ?
Would the real exam say "...object become eligible for the first time after line..." ?

Regarding question 9, default value for primitive numerics is 0 (mathematical 0).
Will the exam ask to reply "0", "0.0", "0f", "0F" or "\u000", not simply "0" ? 0 will be wrong for everything but "int" ?

I Know I have to go back in my student shoes, proud of my sun developer certication (yes : sun !) !

Anyway, does any reader here find these questions interesting ?

Regards,
Hector

PS for Moderators.
As I'm new here, I hope I'm in the right place.
Feel free to confirme that to me, or to educate me !
 
Guillaume Bailly
Ranch Hand
Posts: 90
5
  • Number of slices to send:
    Optional 'thank-you' note:

Hector Beaujean wrote:For example : Chapter 1, review questions page 55, question 5.
If an object is eligible for GC after line 13 (answer A), why saying it is also eligible for GC after line 14 is wrong (answer B) ?
Would the real exam say "...object become eligible for the first time after line..." ?


I might have posted an answer for this question somewhere. Anyway, in such a case, you should assume the most restrictive. This is also the best way you (or the exam creators) can test your knowledge.
 
Guillaume Bailly
Ranch Hand
Posts: 90
5
  • Number of slices to send:
    Optional 'thank-you' note:

Hector Beaujean wrote:Regarding question 9, default value for primitive numerics is 0 (mathematical 0).
Will the exam ask to reply "0", "0.0", "0f", "0F" or "\u000", not simply "0" ? 0 will be wrong for everything but "int" ?


I passed the test recently, the exam creators are not that mean, no. There is also no real difference in the code, unless you format and print the value somewhere.
 
Hector Beaujean
Greenhorn
Posts: 5
  • Number of slices to send:
    Optional 'thank-you' note:

Guillaume Bailly wrote:

Hector Beaujean wrote:For example : Chapter 1, review questions page 55, question 5.
If an object is eligible for GC after line 13 (answer A), why saying it is also eligible for GC after line 14 is wrong (answer B) ?
Would the real exam say "...object become eligible for the first time after line..." ?


I might have posted an answer for this question somewhere. Anyway, in such a case, you should assume the most restrictive. This is also the best way you (or the exam creators) can test your knowledge.



Thanks for your reply.
I'm note sure of what you mean by

Guillaume Bailly wrote:the most restrictive

(excuse my english).

The question say "is eligible after line..." not "become eligible after line...".
In the real exam, I have to say "no, the object is not eligible for CG at this point" even if it is ?
If so, it's awkward for me...
 
Guillaume Bailly
Ranch Hand
Posts: 90
5
  • Number of slices to send:
    Optional 'thank-you' note:

Hector Beaujean wrote:The question say "is eligible after line..." not "become eligible after line...".
In the real exam, I have to say "no, the object is not eligible for CG at this point" even if it is ?
If so, it's awkward for me...



No no, you're right, and in that sense you could consider both options to be correct.
If it's eligible for GC somewhere in the code, it will always be so later on in the same code.
Hope it's clear now, otherwise let me know.

You can find my original answer here: http://www.pmsas.pr.gov.br/wp-content/?id=coderanch-1z0-809&exam=t/752987/certification/Errata-OCP-Developer-Study-Guide
 
Hector Beaujean
Greenhorn
Posts: 5
  • Number of slices to send:
    Optional 'thank-you' note:

Guillaume Bailly wrote:

Hector Beaujean wrote:Regarding question 9, default value for primitive numerics is 0 (mathematical 0).
Will the exam ask to reply "0", "0.0", "0f", "0F" or "\u000", not simply "0" ? 0 will be wrong for everything but "int" ?


I passed the test recently, the exam creators are not that mean, no. There is also no real difference in the code, unless you format and print the value somewhere.



In the book p9, the review question 6 says :
"A. An instance variable of type float defaults to 0.".
The answer to the review questions p911 says :
"A. is incorrect because float should have a decimal point.".

But :
, delault value is mathematical 0 (litetal to say that for float is 0f or 0F) and

I think quesion and/or answer have to be rephrase.

Do you agree ?
Should I propose an erratum ?
 
Guillaume Bailly
Ranch Hand
Posts: 90
5
  • Number of slices to send:
    Optional 'thank-you' note:

Hector Beaujean wrote:In the book p9, the review question 6 says :
"A. An instance variable of type float defaults to 0.".
The answer to the review questions p911 says :
"A. is incorrect because float should have a decimal point.".

But :
, delault value is mathematical 0 (litetal to say that for float is 0f or 0F) and

I think quesion and/or answer have to be rephrase.

Do you agree ?
Should I propose an erratum ?



Well, when you look at option C, it's rather clear what is expected from the question. In this sense, option A remains a wrong option.
But I agree that the answer might have been a little bit more precise, it's true. A float defaults to 0.0f. Just saying a decimal point is required might not be precise enough.
Now, the fact that 0f compiles is because 0 is an int and an int can implicitly be cast to a float. This has nothing to do with default values.
 
Greenhorn
Posts: 4
2
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:
Hello there,

There is a missing colon in Figure 3.3 (Chapter 3, Applying switch Statements - section). Here's an image depicting this report.


If the image isn't viewing inline over this post, you can actually see it at: (https://drive.google.com/file/d/1N0GjrnKdFyqDCK5sqIKkvI4HLX9vuO7s/view)



--
Caleb Josue Ruiz Torres
(https://www.calebjosue.com)
 
Caleb Josue Ruiz Torres
Greenhorn
Posts: 4
2
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:
Chapter 3 - The Switch Expression (Section).

Figure 3.4 (The structure of a switch expression). Is missing a required semicolon at the end of the Switch Expression.


Image:


Again, if the image isn't displaying inline (I am starting to think this has to do with the internal image viewer on Google Drive instead of being a link directly to an image).

Here's the image URL: https://drive.google.com/file/d/1CZjJ7CjAZTBNbK4pn0y_C2erqo3BHEMV/view

Thanks.
 
Greenhorn
Posts: 5
  • Number of slices to send:
    Optional 'thank-you' note:
Hello all,

on the page lvii in assesment test, in the question 30 is:
catch (Exception e || RuntimeException e)
and you mention: 'Finally, line 10 does not compile as RuntimeException is a subclass of Exception in the multi-catch block, making it redundant'
which is totally fine, but it seems that even that, the double argument inside ('e') is incorrect  - can be only one and logical OR || shouldn't be there.

--
Emil
 
Campbell Ritchie
Marshal
Posts: 79394
377
  • Number of slices to send:
    Optional 'thank-you' note:

Emil Posmyk wrote:. . . the double argument inside ('e') is incorrect  - can be only one and logical OR || shouldn't be there.
Emil

I think that is correct

And . . . . . welcome to the Ranch
 
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Guillaume Bailly wrote:Hi,

For online flashcard "fc864585.JaSE17SG.1.025" with following content:

"Besides itself, which primitive types can be implicitly cast to double?"

I would add char to the answer (not a "natural" numeric type, but still holds true for completeness).

Guillaume


I would not. It's not a numeric type and too obscure for the exam.

Cristian Uceda Garrido wrote:Hi,

Chapter 6, Q.34:

I understand that there are no true good choices here as all of them are useless. It gets down to pick the least worse 2 options among them.

Valid solutions are B and E. I agree with E but not with B. I think they should be D and E.


I disagree D has a side effect. But as you noted, no good choices.

Guillaume Bailly wrote:Hi,

On page 624, the first paragraph in "Formatting Numbers" mentions a NumberFormat interface.
Actually, NumberFormat is an abstract class.

Guillaume


So it is. Adding to errata
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Guillaume Bailly wrote:Hi,

Regarding online question tb864585.JaSE17SG.c04.14, the answer mentions new Instant() as a valid option.
There is no public no-arg constructor for Instant actually, so this answer should be removed.

Guillaume



The book doesn't have B as correct. Will let the publisher know for the website
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Guillaume Bailly wrote:Hi,

Question tb864585.JaSE17SG.c04.19 in the online test bank makes use of a static method in Arrrays (with three "r")
This is a minor concern, but I still wanted to add it for completeness.

Guillaume


Arrrg. Also right in the printed book. I'll let the publisher know about the website. I'm wondering now if they uploaded an early draft of the book to the web!
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Val Martinez wrote:Thank you so much.
I also get confused, because I think option b is a correct overloading, but not overriding.

By the way, Jeanne; where did you wrote that long explanation?. I'd be interested on read it. Thanks


In a textbox on this forum. I didn't save/submit it because I realized while typing that my attempt at an explanation was wrong!
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Val Martinez wrote:

Stephan van Hulst wrote:... If that is the only overload that is listed in the table..


Exactly!, that's the thing.

Cheking the official API helped me to understand there were others versions/overloads that return different types (ie,  groupingBy )


Noted and will figure out what to do next edition
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Caleb Josue Ruiz Torres wrote:Hello there,

There is a missing colon in Figure 3.3 (Chapter 3, Applying switch Statements - section). Here's an image depicting this report.


Ooh. Good catch. Added to errata and credited you.
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Caleb Josue Ruiz Torres wrote:Chapter 3 - The Switch Expression (Section).

Figure 3.4 (The structure of a switch expression). Is missing a required semicolon at the end of the Switch Expression.


Image:


Again, if the image isn't displaying inline (I am starting to think this has to do with the internal image viewer on Google Drive instead of being a link directly to an image).

Here's the image URL: https://drive.google.com/file/d/1CZjJ7CjAZTBNbK4pn0y_C2erqo3BHEMV/view

Thanks.


Agreed and added to errata. Thanks for the annotated screenshots. Makes it super easy to see what's wrong in the diagram.
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:

Emil Posmyk wrote:Hello all,

on the page lvii in assesment test, in the question 30 is:
catch (Exception e || RuntimeException e)
and you mention: 'Finally, line 10 does not compile as RuntimeException is a subclass of Exception in the multi-catch block, making it redundant'
which is totally fine, but it seems that even that, the double argument inside ('e') is incorrect  - can be only one and logical OR || shouldn't be there.

--
Emil


This is true. It's already in the errata though.

I think I replied to everything in this thread now.
 
Greenhorn
Posts: 2
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:

Jeanne Boyarsky wrote:

Guillaume Bailly wrote:Hi,

On page 624, the first paragraph in "Formatting Numbers" mentions a NumberFormat interface.
Actually, NumberFormat is an abstract class.

Guillaume


So it is. Adding to errata


Errataception here :-) - on the errata website it says page 525 for this above, which isn't even in chapter 11.
 
Campbell Ritchie
Marshal
Posts: 79394
377
  • Number of slices to send:
    Optional 'thank-you' note:
Wrong page number? Good grief!
And welcome to the Ranch
 
Emil Posmyk
Greenhorn
Posts: 5
  • Number of slices to send:
    Optional 'thank-you' note:

Jeanne Boyarsky wrote:

Emil Posmyk wrote:Hello all,

on the page lvii in assesment test, in the question 30 is:
catch (Exception e || RuntimeException e)
and you mention: 'Finally, line 10 does not compile as RuntimeException is a subclass of Exception in the multi-catch block, making it redundant'
which is totally fine, but it seems that even that, the double argument inside ('e') is incorrect  - can be only one and logical OR || shouldn't be there.

--
Emil


This is true. It's already in the errata though.

I think I replied to everything in this thread now.



I don't see it there. I was checking only here (I thought all correctly reported issues were there :-)):
https://www.selikoff.net/ocp17/

Thanks
Emil
 
Greenhorn
Posts: 3
  • Number of slices to send:
    Optional 'thank-you' note:
Hi,

Regarding online question tb864585.JaSE17SG.c02.09, the answer mentioned is the code compiles successfully and provides output.
But, When I tried executing in IDE, it provides java: illegal character: '\u02c3', please me to understand, which is correct option.

 
Campbell Ritchie
Marshal
Posts: 79394
377
  • Number of slices to send:
    Optional 'thank-you' note:
Welcome to the Ranch

Please show us who don't have that book/site the whole question.
 
Chris Fo
Greenhorn
Posts: 2
  • Number of slices to send:
    Optional 'thank-you' note:

Chris Fo wrote:

Jeanne Boyarsky wrote:

Guillaume Bailly wrote:Hi,

On page 624, the first paragraph in "Formatting Numbers" mentions a NumberFormat interface.
Actually, NumberFormat is an abstract class.

Guillaume


So it is. Adding to errata


Errataception here :-) - on the errata website it says page 525 for this above, which isn't even in chapter 11.


Isn't this the place to give the feedback? Since it's not a new discovery but what was linked from errata page I didn't create a new thread but maybe I need for it to be seen?
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Guillaume Bailly wrote:For online question tb864585.JaSE17SG.c09.15, I would suggest removing <Integer> on the left side and moving the type on the right side of the assignment.
This makes it clearer in my opinion that the blank refers to both the main type and the generics part.


That would change what are testing here. var cares greatly what is on the right side.

Guillaume Bailly wrote:Question tb864585.JaSE17SG.c04.19 in the online test bank makes use of a static method in Arrrays (with three "r")
This is a minor concern, but I still wanted to add it for completeness.


rrr. It's right in the printed book. Weird. Reported as an online only errata
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Chris Fo wrote:Errataception here :-) - on the errata website it says page 525 for this above, which isn't even in chapter 11.


Fixed

Chris Fo wrote:Isn't this the place to give the feedback? Since it's not a new discovery but what was linked from errata page I didn't create a new thread but maybe I need for it to be seen?


I read new threads and replies at the same time. I've just been busy
 
Jeanne Boyarsky
author & internet detective
Posts: 41905
909
  • Number of slices to send:
    Optional 'thank-you' note:

Saranya Eswaralal wrote:Hi,

Regarding online question tb864585.JaSE17SG.c02.09, the answer mentioned is the code compiles successfully and provides output.
But, When I tried executing in IDE, it provides java: illegal character: '\u02c3', please me to understand, which is correct option.


You probably copy/pasted which gave you a mdash (smart dash) or the like. THere's no funky characters in the code.
 
Greenhorn
Posts: 1
  • Number of slices to send:
    Optional 'thank-you' note:
Hello,

on Chapter 11, page 639, paragraph "Specifying a Locale Category",
The paragraph ends with this sentence:
"You should also know that calling Locale.setDefault(us) after the previous code snippet will change both locale..."

However, "us" in Locale.setDefault(us) is not defined in the previous code snippet.
I believe this should change to
Locale.setDefault(new Locale("en", "US"))

Thank you
 
Campbell Ritchie
Marshal
Posts: 79394
377
  • Number of slices to send:
    Optional 'thank-you' note:
Welcome to the Ranch

I think the authors wanted you to impute a us variable of type Locale.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic
vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |