Page 319, question 9:
Which of the following prints OhNo with the assertion failure when the number is negative?
should be:
Which of the following prints OhNo with the assertion failure when the number is positive?
Question 11 is wrong in the online version of the
test from
https://sybextestbanks.wiley.com. It shows IllegalFormatException as option A, but gives the same answer as correct (implying IllegalFormatException isn't a RuntimeException). The book is correct though, as the value for option A is Exception. I take it this has already been spotted and corrected, but I thought I'd add a note here for those who are only taking the tests online.
Page 32, question 17: technically, a class which implements Serializable
may be in a try-with-resource statement (as long as it also implements Autocloseable or Closeable).