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.
Thanks RitchieCampbell Ritchie wrote:VM: Welcome to the Ranch
Stephan van Hulst wrote:... If that is the only overload that is listed in the table..
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..." ?
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" ?
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.
(excuse my english).Guillaume Bailly wrote:the most restrictive
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...
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.
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 ?
--
Caleb
(https://calebjosue.gigalixirapp.com/)
--
Caleb
(https://calebjosue.gigalixirapp.com/)
I think that is correctEmil Posmyk wrote:. . . the double argument inside ('e') is incorrect - can be only one and logical OR || shouldn't be there.
Emil
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
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.
Guillaume Bailly wrote:Hi,
On page 624, the first paragraph in "Formatting Numbers" mentions a NumberFormat interface.
Actually, NumberFormat is an abstract class.
Guillaume
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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 )
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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
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.
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.
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.
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.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Chris Fo wrote:Errataception here :-) - on the errata website it says page 525 for this above, which isn't even in chapter 11.
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?
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|