[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:
While on pages 519 and 520, it is correctly stated that values (respectively keys) cannot be null for TreeSet (respectively TreeMap), it is somewhat imprecise on page 491 in my opinion. One can read there:
"...The data structures that involve sorting do not allow null values."
There is indeed no mention of keys here, and TreeMap can actually store null values.
[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,
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?
[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:On page 627, there is a minor difference between the code and the output of the DateTimeFormatter.
Using the format "h:mm z", the code would actually print something like 6:15 EDT.
The output 06:15 EDT actually corresponds to the format "hh:mm z".
Guillaume Bailly wrote:If I may make one suggestion, I would mention DateTimeException (er even UnsupportedTemporalTypeException) at the top of page 626 (instead of RuntimeException).
This makes it clearer in my opinion that there is a similar behavior in case of error between this code and the code on page 627.
Guillaume Bailly wrote:I would like to add some precision to what is stated on page 636 about CompactNumberFormat.
At the bottom of the page, the rules mention that only a maximum of three digits will ever be printed.
This is true most of the time but not always. For example, the following code will print 9223372T:
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:For completeness, I would make the following changes (or something similar) in Table 12.15 on page 700.
-p <path>
--add-modules <names>
--output <dir>
Guillaume Bailly wrote:Spoiler alert, this is a question about review question 1 of chapter 12 on page 713.
I understand that a valid named module needs to have a module-info.java file at the root of the package structure.
But why would this module not already be valid if we consider it as an automatic module?
Guillaume Bailly wrote:Answer to review question 17 of chapter 12 on page 950 mentions module.info at the end instead of module-info.java.
[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:"First, it looks at the source and seeing three elements" (middle of page 565)
=> not exactly grammatically correct
Guillaume Bailly wrote:"Aside from BooleanSupplier, they all involve the double, int, or long primitives." (top of page 580)
=> not sure how this relates to the text that precedes
Guillaume Bailly wrote:"The sum() method returns an int rather than an OptionalInt because the sum of an empty list is zero." (answer to review question 8 of chapter 10 on page 943)
=> technically this is not a list but a stream
Guillaume Bailly wrote:Review question 20 of chapter 10 on page 590
=> there is actually no explicit link between the Optional of the question and the variable opt in the answers
Guillaume Bailly wrote:"[...] which make option H the final answer." (answer to review question 11 of chapter 12 on page 950)
=> the phrasing is a little bit weird, since D and G are also right
[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,
This is a correction for review question 4 of chapter 13.
In my opinion is answer B not correct, unlike what is stated on page 952.
When I run the code, line w1 compiles fine as ScheduledExecutorService extends ExecutorService.
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:I just wanted to add some precision to table 14.9 on pages 823-824.
The method public byte[] readAllBytes() is actually defined in InputStream.
The method public void write(String line) is actually defined in Writer.
[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:"Unlike Runnable, in which the get() methods always return null[...]"
This sentence could give the impression that there are get() methods on a Runnable.
Guillaume Bailly wrote:When looking at the Java API, it appears that CallableStatement actually extends from PreparedStatement instead of being a sibling.
So, while they both are subinterfaces of Statement (as correctly stated on page 873), the drawing could perhaps be updated to better reflect the reality.
Guillaume Bailly wrote:In this case, I don't really understand why the procedure in review question 14 of chapter 15 only mentions a single ? as parameter.
There, I would expect two ? inside the parentheses since there is one IN parameter and one OUT parameter.
[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:The note on page 762 says "The Stream interface includes a method isParallel() [...]"
This might sound like Stream defines this method, while it actually inherits it from BaseStream.
With interfaces there is not a big difference, except for us to know that this method is also available for primitive streams.
Guillaume Bailly wrote:The copy() method on page 798 is rather confusing since it actually does a move operation.
Guillaume Bailly wrote:The box on top of page 814 is missing bold font for one "forName" (unless there is a reason for this).
Guillaume Bailly wrote:Although table 15.7 on page 888 clearly describes the procedures that follow, I would have found it useful to also see the output for the procedures that are called in the following pages.
Guillaume Bailly wrote:For review question 6 of chapter 15 on page 901, I would add single quotes around the word Jenga.
Guillaume Bailly wrote:About review question 17 of chapter 14 (pages 858 and 957), I understand why option F is not correct, although I think it could have been a little bit better justified.
I read "Files is part of NIO.2, whereas File is part of java.io, which means option F is incorrect."
The real reason to me is that Files.readAtributes() works with the Path interface.
[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,
Spoiler alert, this post is related to question 'tb864585.JaSE17SG.pe1.07' in the online test bank.
The question and the answers are correct.
However, the answer mentions snakes.isEmpty() instead of snakes.toString().
Guillaume
Guillaume Bailly wrote:Hi,
Just a typo for question 'tb864585.JaSE17SG.pe2.15' in the online test bank.
Instead of
"Which are the following are valid lambdas that can..."
One should read
"Which of the following are valid lambdas that can..."
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,
While I get the point behind the flashcard 'fc864585.JaSE17SG.1.049' in the online tool, it leads to confusion in my opinion (which might be on purpose).
It says "True or false? A switch expression is always required to have a default statement when assigning the result to an int value."
And then "True, since handling every possible int value would be untenable."
While the answer is correct on its own, I'm not sure it really answers the question.
[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
B) (a, b) -> 5
D) (a, b) -> {words.add("awesome"); return 0;}
E) (a, b) -> {return 0;}
Cristian Uceda Garrido wrote:
[...]By the way, should not it be parallel() instead of parallelStream()?[...]
Cristian Uceda Garrido wrote:
[...]
Chapter 6, Q.34:
[...]
Guillaume Bailly wrote:
Cristian Uceda Garrido wrote:
[...]
Chapter 6, Q.34:
[...]
Strange, Stream is in chapter 10 in OCP 17 Study Guide.
Are you sure you mean ch. 6 q. 34? (I can't find it anywhere)
I would like to help but...
Guillaume
You can't have everything. Where would you put it?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|