Penguin Power!
Buy Linux distributions at discount prices!
Linux| Perl| PHP| Webserv| Databases| Sysadmin| Programming| Filesystems| Java| Webprog
News from Slashdot
Dealing With Dialup

Government Efficiency and Network Theory

DataStorm V1.0, a Full-Auto Floppy Disk Cannon

XP SP3 Crashes Some AMD Machines

Recruitment Options For a Small-Scale FOSS Project?

Hiding a Rootkit In System Management Mode

Changes In Store For PHP V6

VIA Releases 16K-Line FOSS Framebuffer Driver

What Is the Oldest Code Written Still Running?

DDR3 RAM Explained


Related products:

Effective Java Programming Language Guide Effective Java Programming Language Guide

Java Concurrency in Practice Java Concurrency in Practice

Head First Design Patterns Head First Design Patterns

Java After Hours : 10 Projects You'll Never Do at Work Java After Hours : 10 Projects You'll Never Do at Work

Java

Java(TM) Puzzlers : Traps, Pitfalls, and Corner Cases

Java
Format: Paperback
Author: Joshua Bloch
ReleaseDate: 24 June, 2005
Publisher: Addison-Wesley Professional
Rating:

another cracker from Josh ...


Anyone who believes they are a Java master should read this book, it is well written, captivating, informative and full of useful information!

In short it's a must have (along with Effective Java) for your Java bookshelf. Disclaimer: the fact that I have known and worked with Josh on and off for around 10 years now has little bearing on my review of this book.


Great book
Authors try to model/abstract real-world senarios into some "silly trivia" puzzles. This is really another excellent book I've seen on Java. You may say they are "Not puzzles, just silly trivia", but if you are experienced Java developer, you will figure out what they really mean and then smile on them. I have to say I was lost in some of those puzzles before in my real-world programming history. . .
It's not easy to address real-world problems in such a generic way. This book really makes the complication simple. Great job!.


Unique book finds pitfalls in both programs and the language itself
Anyone with a working knowledge of Java can understand these puzzles, but many of them are tough enough to challenge even the most experienced programmer. This book is filled with brainteasers about the Java programming language and its core libraries. Puzzlers are grouped according to the features they use, but you cannot assume that the trick to a puzzle is related to its chapter heading.

Most of the puzzles exploit counterintuitive or obscure behaviors that can lead to bugs. Every platform has them, but Java has far fewer than other platforms of comparable power. The goal of the book is to entertain the reader with puzzles while teaching you to avoid the underlying traps and pitfalls. By working through the puzzles, you become less likely to fall prey to these dangers in your own code and more likely to spot them the code of others over which you have maintenance priveleges.

This book is meant to be read while you have access to a computer that has a Java development environment installed, ideally JDK 5. 0, which is the latest release at the time I am writing this. That is because some of the puzzles rely on pitfalls in this particular release of Java.

Most of the puzzles take the form of a short program that appears to do one thing but actually does something else. It's the reader's job to figure out what each program does. It would be best if you first study the program/puzzle and determine what you think it will do. Next, run the program and see if its expected behavior matches its actual behavior. Try to fix the program if you believe it is "broken". Finally, read the solution and see if it matches your answer. What is really great about this book is that it sticks to pitfalls in the core language and doesn't delve into any of the add-on API's or J2EE. You'll be surprised that so many pitfalls can be conjured up in the core language. Amazon does not show the table of contents, so I do that here along with a brief description of the type of puzzles in each chapter.

1. Introduction
2. Expressive Puzzles - The puzzles in this chapter are simple but not necessarily easy and involve only expression evaluation. My personal favorite : the statement "System. out. println(2. 00 - 1. 10);" displays 0. 8999999999999999 instead of . 9. There is a solution, but it is not pretty and showcases a pretty bad weakness in the Java language.
3. Puzzlers with Character - This chapter contains puzzles that concern strings, characters, and other textual data. This section contains several puzzles involving unicode characters, and one is a cautionary tale for language designers in character overloading. Example: System. out. print('H' + 'a'); prints the number 169 not the word "Ha" as you might imagine.
4. Loopy Puzzlers - All the puzzles in this chapter concern loops, such as coming up with declarations that turn simple loops into infinite ones.
5. Exceptional Puzzlers - The puzzles in this chapter concern exceptions and the closely related Try-finally statement. Most exhibit odd behavior such that simple changes in the program cause completely different types of exception handling to occur.
6. Classy Puzzlers - This chapter contains puzzlers that concern the use of classes and their instances, methods, and fields.
7. Library Puzzlers - The puzzles in this chapter concern basic library-related topics, such as Object methods, collections, Date, and Calendar. One particularly interesting puzzler illustrates that, in Java, integer literals beginning with a "0" are interpreted as octal values. This obscure construct is a holdover from the C programming language and the 1970s, when octal was much more commonly used than today. Thus "012" is seen by Java as 10 base 10.
8. Classier Puzzlers - The puzzles in this chapter concern inheritance, overriding, and other forms of name reuse.
9. More Library Puzzlers - The puzzles in this chapter feature more advanced library topics, such as threading, reflection, and I/O. Here you will learn, for example, that "write(int)" is the only Java output method that does not flush a PrintStream on which automatic flushing is enabled. Thus you must explicitly invoke "flush" on its stream to print any message, making the "write" method seem unfriendly and outright pointless.
10. Advanced Puzzlers - The puzzles in this chapter concern advanced topics, such as nested classes, generics, serialization, and binary compatibility.
A. Catalog of Traps and Pitfalls - This chapter contains a concise taxonomy of traps and pitfalls in the Java platform. Each entry in the catalog is divided into three parts - A short description of the pitfall, how to avoid the trap, and pointers to additional information on the trap.
B. Notes on the Illusions - This appendix contains brief descriptions of the graphical illusions that appear throughout the book. The descriptions are grouped loosely by category. Within each category, the order is roughly chronological.

This book is very good practice for anybody who enjoys programming in the Java language, but it will probably appeal the most to the geekiest among us of which I proudly count myself.
.



Go to lyrics-now.com for music lyrics and song lyrics.
Bass and guitar tablatures: Fretplay.com, Guitar tabs, Bass tabs, Fresh tabs, How to read tabs
Plan your travel and holiday here: Travel Helper!