Welcome to CodeRanch! You are the first to spot that one.
Thank you for reporting it. I've added it to the errata and credited you. *And* that error exists in the draft of our Java 17 book. We will be sure to fix it during editing. Have two cows for improving our next book!