Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!

Tomasz Kasprzyk

Ranch Hand
+ Follow
since Jul 18, 2020
Cows and Likes
Cows
Total received
2
In last 30 days
1
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
5
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tomasz Kasprzyk

The factory method in the code snippet is missing the static keyword (mentioned in the paragraph):

(...) This technique requires static factory methods to obtain the object.



should be:
In the 8th question it is written:

Suppose that the table animal has five rows and the following SQL statement updates all of them. (...)


In the code snippet for the question the 2nd line is:

The table name in the SQL String does not comply with the table name in the content of the question.
If so, it is difficult to assume that the statement updates all of the rows.
"A SQLException is thrown" seems like the correct answer (ignoring the assumption ("the statement updates all of them") and the information that understanding the SQL statements is out of the scope of the exam).
In the table like in the subject, which lists some of the PreparedStatement methods, in the second column are:

Boolean, Double, Int, Long, Object, String


If we keep the Wrapper Classes, it could be (Int --> Integer):

Boolean, Double, Integer, Long, Object, String.


Or maybe it would be better to replace the Wrapper Classes types with their primitive counterparts?

boolean, double, int, long, Object, String


According to the docs the setX() methods do not have the overloads taking the Wrapper Classes as the 2nd parameter.
In the last sentence of the "Manage file attributes" paragraph it is written:

Finally, NIO.2 supports updatable views for modified select attributes.


Maybe it could be:

Finally, NIO.2 supports updatable views for modifying selected attributes.

The first sentence after the code snippet under the Figure begins with:

Since cobra is a symbolic link to snake.


should be:

Since snake is a symbolic link to cobra.

In the table like in the subject two rows in the 2nd column are inconsistent with the rest. Most of the listed methods have the return type and the names of the parameters specified:

It is written:

void write(int)
mark(int readLimit)



it could be:

void write(int b)
void mark(int readLimit)


What if we have an implementation of MyRunnable like below?

it will throw the unchecked exception (NullPointerException).
Moreover, since it is an unchecked exception, there is not restriction to declare it with the throws keyword
12. Explanation to the question 20, Review Questions Chapter 7. (p. 1018)
In the explanation it is written:

If the submit() method had been used instead of execute(), then option C would have been correct answer (...)


That seems not true because the service variable is still not effectively final and causes a compilation error.
(see the screenshot from the 11.)
11. Chapter 7., Review Questions, question 20. (p. 646)
in the code snippet it is written:
<Future>?>> should be: <Future<?>>
10. Chapter 6., Adding a Service Provider (p. 531)
In the TourImpl.java the "Stuffed animal"
Maybe it is ok but for the similar line in the QuickTourImpl.java the change was made (link to the commit)
9. Chapter 6. description before the Figure 6.10 (the last sentence, p. 524), it is written:

In this example, the zoo.tours.api and zoo.tours.reservations models make up the service since they consist of the interface and lookup functionality


should be:

In this example, the zoo.tours.api and zoo.tours.reservations modules make up the service since they consist of the interface and lookup functionality

8. Chapter 6. Exploring a Top-Down Migration Strategy (p. 518).
In the 4th point it is written:

4. Repeat with the next-lowest-level project until you are done


it should be:

4. Repeat with the next-highest-level project until you are done

7. Chapter 6., Table 6.5 (p. 509). A space to remove in:

java.net .http

6. Chapter 3., the last code snippet in Naming Conventions for Generics. Missing letter "d" in the constructor call.

SizeLimitedCrate<Elephant, Ingeter> c1 = new SizeLimiteCrate<>(elephand, numPounds);

5. Chapter 3., Table 3.7 (p.245-248)
Instead of: it should be: