Java Cookbook

Errata for Java Cookbook

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted
Printed Page 451
Half way down from top

There is a component called ChatProtocol that is referred to, but never defined. The code does not work without this ChatProtocol component. I was told that the downloadable zip of code examples from GitHub contained the complete code, but I have reviewed it and the same problem exists in the downloadable zip as in the printed code. The same problem exists in the ChatServer example and downloadable files. The ChatClient and the ChatServer definitely do NOT compile. I have already submitted this errata report and I received a very concerning response: "It was never the intention that the code fragments in the book be complete and self-contained." This is a cop-out as a programming "cookbook" is supposed to be a book of working examples that someone can study and apply to their own projects. What good is a code example book that doesn't have complete and working examples?

mad-hax.com  Feb 20, 2018 
Printed Page 567
Last line on page

The last line (and throughout the code) includes an object called ChatProtocol that is never defined: servSock = new ServerSocket(ChatProtocol.PORTNUM); This ChatProtocol is referenced many times, but without it being defined the code does not work. This means the ChatServer example is broken and will not run. I have submitted this before and was told that the complete code was in the downloadable code examples from GitHub. This is not correct as the code in the GitHub repository has the same problem and does NOT compile either. I received a very concerning response: "It was never the intention that the code fragments in the book be complete and self-contained." This is a cop-out as a programming "cookbook" is supposed to be a book of working examples that someone can study and apply to their own projects. What good is a code example book that doesn't have complete and working examples?

mad-hax.com  Feb 20, 2018