Java Puzzlers

Java Puzzlers

4.11 - 1251 ratings - Source

qEvery programming language has its quirks. This lively book reveals oddities of the Java programming language through entertaining and thought-provoking programming puzzles.q --Guy Steele, Sun Fellow and coauthor of The Javaa„c Language Specification qI laughed, I cried, I threw up (my hands in admiration).q --Tim Peierls, president, Prior Artisans LLC, and member of the JSR 166 Expert Group How well do you really know Java? Are you a code sleuth? Have you ever spent days chasing a bug caused by a trap or pitfall in Java or its libraries? Do you like brainteasers? Then this is the book for you! In the tradition of Effective Javaa„c, Bloch and Gafter dive deep into the subtleties of the Java programming language and its core libraries. Illustrated with visually stunning optical illusions, Javaa„c Puzzlers features 95 diabolical puzzles that educate and entertain. Anyone with a working knowledge of Java will understand the puzzles, but even the most seasoned veteran will find them challenging. Most of the puzzles take the form of a short program whose behavior isn't what it seems. Can you figure out what it does? Puzzles are grouped loosely according to the features they use, and detailed solutions follow each puzzle. The solutions go well beyond a simple explanation of the program's behavior--they show you how to avoid the underlying traps and pitfalls for good. A handy catalog of traps and pitfalls at the back of the book provides a concise taxonomy for future reference. Solve these puzzles and you'll never again fall prey to the counterintuitive or obscure behaviors that can fool even the most experienced programmers.Well, yes, it does create a second thread, but it never starts that thread. Instead, the ... What does the program print? importjava.util.*a#39;, public class Worker extends Thread { private volatile boolean quittingTime I falsea#39;, public void run( ) { while (!

Title:Java Puzzlers
Author:Joshua Bloch, Neal Gafter
Publisher:Pearson Education - 2005-06-24


You Must CONTINUE and create a free account to access unlimited downloads & streaming