Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
The questions are about the study guide for OCP Oracle Certified Professional Java SE 11 by Jeanne Boyarsky and Scott Selikoff.
1) Default value for long
On p 53, the table shows that the default value for long is 0. However, the answer to the review question 8 on page 495 shows that the default value is 0L. When I tested with printing uninitialized class variables of type long and float, they defaulted to 0 and 0.0 respectively. Why is 0L the right answer to question 8 of Ch II review test then?
2) Changing numeric base
On p 68, first paragraph ends with saying that the latter four indicate a change of numeric base. However the first two in the list are decimal and octal - isn't octal also a change of numeric base compared to decimal? Shouldn't it then be 'the latter five'?
The question about 0/0L has come up here several times. One of the authors said it simply means that the default values are zero throughout rather that specifying the format of that 0 (64 bits rather than 32 bits). Look at this discussion..