Page 7 of 7 Results 61 - 64 of 64

Errata Entries Order by:  Page Number  Reported By  Reported On  Fixed In Build
Pg: 292
Status: Fixed
Fixed in Build: 08
Reported On: 2018-11-20
Reported By: --
Location: 10.4 - Exceptions thrown by Application Programmer
Old Text:
$\vert$$\vert$
New Text:
||
Comments:
Mistake in typesetting of the paperback version. Kindle version is fine.
Pg: 104
Status: Fixed
Fixed in Build: 10
Reported On: 2018-12-02
Reported By: -
Location: 4.3.1 - multidimensional-arrays
Old Text:
You cannot, however, leave out the size of a higher dimension if you want to specify the size of a lower dimension. For example, you cannot do new int[][2]; This is not possible because the number of int[][] references depends on how many int[] objects do you have. If you have three int[] objects, that means you will have 3x2 = 6 int[][] references. The JVM cannot figure this out without knowing the length of all the higher dimensions.
New Text:
You cannot, however, leave out the size of a higher dimension if you want to specify the size of a lower dimension. For example, you cannot do new int[][2]; The reason is simple - new int[][2] tries to create an array of int[2] objects. But it it does not tell the JVM how many int[2] objects you want to store. Without this information, the JVM has no idea how much space it needs to allocate for this array. On the other hand, new int[2][] is fine because now, you are telling the JVM that you want to create an array of length 2. In this case, the JVM is clear that it needs to allocate space to store 2 references. Remember that the size of a reference doesn't depend on the length of the array to which it points. So, the JVM doesn't care about the length of the arrays to which these two references will refer. It simply allocates space to store 2 references.
Comments:

Pg: 103
Status: Fixed
Fixed in Build: 16
Reported On: 2019-02-07
Reported By: Username987654
Location: 4.3.1
Old Text:
iaa[0] = new int[2]; //ia[0] points to an array of ints of length 2 iaa[1] = new int[3]; //ia[1] points to an array of ints of length 3
New Text:
iaa[0] = new int[2]; //iaa[0] points to an array of ints of length 2 iaa[1] = new int[3]; //iaa[1] points to an array of ints of length 3
Comments:
ia should be iaa (in comments)
Pg: 68
Status: Fixed
Fixed in Build: 14
Reported On: 2019-01-10
Reported By:
Location: 3.3.3 - Assigning values to variables - primitive assignment
Old Text:
For example, you know that the size of a byte (8 bits) is smaller than the size of an int (16 bits)
New Text:
For example, you know that the size of a byte (8 bits) is smaller than the size of an int (32 bits)
Comments:

Page 7 of 7 Results 61 - 64 of 64