java left logo
java middle logo
java right logo
 

Home arrow Book Reviews arrow Head First Java - Second Edition
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 4089
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
Head First Java - Second Edition E-mail
User Rating: / 126
PoorBest 
 Book Information

Image

Authors: Kathy Sierra, Bert Bates
Paperback: 720 pages
Publisher: O'Reilly Media, Inc.; 2 edition (February 9, 2005)
Language: English
ISBN: 0596009208
Product Dimensions: 9.3 x 8.0 x 1.5 inches
ImageAmazon.com Link


 Book Review

Head First Java, the first in the Head First Series, published by O’Reilly is undoubtedly a masterpiece. It has been designed by Kathy Sierra and Bert Bates; they are the core members of the development team of Sun Java Certification Exams. The book is said to be designed, because it is an art, it has won the hearts of several budding programmers who wanted to learn Java.

Purpose

The book teaches Java through several simple but effective ways. The strength of the book is its narration and the figures. The narration is simple and is just like a trainer talking to his students in a classroom. Readers need not be disappointed that this book has nothing but fundamentals. The figures are sketched so well that if you want to revise some fundamentals of Java Programming, just skim through the book, looking at the figures and you shall be done with your revision!

Organization

This simple book covers as many topics as any other bulky Java epitome in half the number of pages than many other titles and the contents are effectively presented. The book is full of information for beginners and takes them right from language fundamentals to advanced topics like Network Sockets, RMI. There are 18 chapters in all and each chapter by itself could be considered as a lecture given by the authors.

In the first ten chapters, Java and Object oriented fundamentals are narrated and then it is followed by a chapter each on Exception Handling, Introduction to GUI and Event Handling, Swing, Serialization and IO, Network Sockets and Multithreading, Collections and Generics, Deployment and Packaging of Java applications and the final chapter on RMI with small introduction to servlets, EJB and Jini. One full appendix is devoted to the concepts that could not make into the heart of the book. So at the end, you not only have extensive knowledge about fundamentals of Core Java but also you are equipped with decent understanding of other serious concepts.

Difference

Like no other book on Java, this book relies on its layout and narration to attract the readers. Each chapter is a collection of concepts, interviews where a concept comes into life and talks to us, “There are no dumb questions” - FAQ, “Bullet points” – summary of important points, “Be the compiler” - an exercise to manually check if the given code gets compiled, “code magnets” where a shuffled code is to be sorted and then some really good brain teasing puzzles. Once we finish reading a chapter we will have the feeling that we have learnt several important concepts in the simplest possible way and most importantly, we are able to retain them, as we have just read it like a story.

Don’t go by this assumption that the book has no practical code examples, because you shall be shocked to see the real world applications developed in the book. The book gives equal importance to writing Java code as it gives to understanding fundamentals. “Code kitchens” span throughout the book and implements of the concepts just presented. Apart from a final project – the Universal Service Browser, a full fledged Networked Drum Machine is designed in the code kitchen which acts as practical coursework and by the time you are done with the book you have a simple networked MIDI Player written entirely in Java. Also there are some other simple applications, like console based games, that the author presents in between.

Finally

The eight primitive data types in Java are Be Careful! Bears Shouldn’t Ingest Large Furry Dogs. Just don’t get annoyed, but take the first letters of each word and you get Boolean, Char, Byte, Short, Integer, Long, Float and Double. Isn’t it fun to learn this way? Go ahead and pick your copy from Amazon and have more fun!


 Table of Contents
  1. Intro
  2. Breaking the surface: a quick dip
  3. A Trip to Objectville: yes, there will be objects
  4. Know Your Variables: primitives and references
  5. How Objects Behave: object state affects method behavior
  6. Extra-Strength Methods: flow control, operations and more
  7. Using the Java Library: so you don’t have to write it all yourself
  8. Better Living in Objectville: planning for the future
  9. Serious Polymorphism: exploiting abstract classes and interfaces
  10. Life and Death of an Object: constructors and memory management
  11. Numbers Matter: math, formatting, wrappers, and statics
  12. Risky Behavior: exception handling
  13. A Very Graphic Story: intro to GUI, event handling, and inner classes
  14. Work on Your Swing: layout managers and components
  15. Saving Objects: serialization and I/O
  16. Make a connection: networking sockets and multithreading
  17. Data Structures: collections and generics
  18. Release Your Code: packaging and deployment
  19. Distributed Computing: RMI with a dash of servlets, EJB, and Jini
  20. Appendix A: Final Code Kitchen
  21. Appendix B: Top Ten Things that didn’t make into the rest of the book
  22. Index
 Overview of Chapters

Chapter 1: Breaking the Surface

Concepts

  • How Java works
  • Code Structure in Java and anatomy of Java Class
  • Loops and branching in Java
  • Fireside chat: the JVM over the Compiler, who’s important?

CCode

  • 99 Bottles of Beer
  • Phrase-O-Matic

Chapter 2: A Trip to Objectville

Concepts

  • Chair wars: How OO Programming is beneficial over Procedural Programming
  • How to design a class?
  • What’s the difference between a class and an object?
  • Making your first object
  • Small introduction to Java Garbage Collection

Code

  • The Guessing Game

Chapter 3: Know Your Variables

Concepts

  • Types of variables
  • Declaring and using variables
  • Java Exposed: an interview with Object Reference
  • Lifecycle of variables on Garbage-Collectible Heap
  • Arrays in Java

Code

  • A Dog example demonstrating the above concepts

Chapter 4: How Objects Behave

Concepts

  • More on methods in Java
  • Getters and Setters
  • Encapsulation
  • Java Exposed: an interview with Object about Encapsulation
  • How arrays of an object behave?
  • More on member variables in a Java class

Code

  • Nothing major example written but each of the above concepts are followed by a simple Dog example demonstrating them.

Chapter 5: Extra-Strength Methods

Concepts

  • This chapter explains clearly how to write a program as per the requirements
  • More about for loop and enhanced for loop
  • Type casting : Casting Primitives

CCode

  • Battleship-style game: “Sink a Dot Com”

Chapter 6: Using the Java Library

Concepts

  • How to identify a bug and how to fix it?
  • The ArrayList class and what you can do with it.
  • Java Exposed: interview with ArrayList, on arrays
  • ArrayList vs. Regular Array : How they differ
  • Using the Java API

Code

  • Improvised code for : “Sink a Dot Com”
  • Its final and revised code

Chapter 7: Better Living in Objectville

Concepts

  • Importance of OO Programming : Chair wars revisited
  • Using inheritance and more about inheritance and tips
  • Designing an Inheritance tree
  • Using IS-A and HAS-A
  • Do’s and Don’ts when using inheritance
  • How polymorphism works
  • Method overriding and rules to be followed
  • Overloading a method

Code

  • Simple examples explaining the concepts, nothing in major

Chapter 8: Serious Polymorphism

Concepts

  • Designing with inheritance
  • Abstract classes , abstract methods
  • Polymorphism in action
  • Interfaces

Code

  • Using existing classes a PetShop is designed based on the concepts of polymorphism and later it is improved by introducing interfaces

Chapter 9: Life and Death of an Object

Concepts

  • Stack and Heap memory : where things live
  • Object Creation – Constructors
  • Role of super class constructors
  • How to invoke a super class constructor
  • Object’s Lifetime and variable’s Lifetime
  • Fireside chats : Local Variable vs. Instance Variable

Code

  • Simple code snippets to demonstrate the concepts

Chapter 10: Numbers Matter

Concepts

  • Static vs. Non-Static(regular) methods
  • Static variables and rules regarding statics
  • Static final variables
  • Math class and its methods
  • Wrapper classes over primitive data types
  • Autoboxing – new with JDK 5.0
  • Number formatting, format specifier
  • Working with Dates
  • How do you work with Calendar objects
  • Static imports – new with JDK 5.0
  • Fireside chats: Instance variable vs. Static variable

Code

  • Code snippets to explain the concepts

Chapter 11: Risky Behavior

Concepts

  • JavaSound API explained
  • Introduction to Exceptions through JavaSound API
  • Exception objects
  • Runtime Exceptions
  • Flow control in try/catch blocks
  • Using finally
  • Multiple exceptions
  • Using Polymorphism in Exception handling
  • Using throws

Code

  • Code Kitchen : Getting started with MIDI Player in Java

Chapter 12: A Very Graphic Story

Concepts

  • Getting started with GUI programming
  • Getting a user event
  • How listeners and source communicate
  • Listeners, Sources and Events
  • 2D Graphics, how to work with ImageIcon
  • Working with Gradient blends
  • Working with GUI Layouts
  • Working with inner classes
  • Java Exposed: Interview with Instance of an Inner Class
  • Simple animation trick using Inner class

Code

  • Simple Animation code
  • Code Kitchen: adding music video using Java generated random graphics and adding non GUI-Events to the player

Chapter 13: Working on your Swing

Concepts

  • Swing components
  • Working with Layout Managers : Border, Flow and Box
  • Playing with Swing components

Code

  • Code Kitchen: Making a full Beat Box GUI and adding it to the player

Chapter 14: Saving objects

Concepts

  • Saving state using serialization
  • Writing serialized object to a file
  • What happens during serialization
  • Implementing Serializable interface
  • transient variables
  • Deserialization
  • Writing a string to a text file
  • java.io.File class
  • using Buffers
  • Reading from a text file
  • Using String.split()
  • Working with Version ID

Code

  • e-Flashcards
  • Saving and storing Game characters
  • Code Kitchen: Saving and Restoring Beat Box pattern

Chapter 15: Making a Connection

Concepts

  • Making a network Socket Connection
  • Reading data from a socket using BufferedReader
  • Writing data to a socket using PrintWriter
  • Writing a simple server
  • Multithreading in Java
  • How to launch a new thread
  • Implementing Runnable interface
  • The Thread Scheduler
  • Thread.sleep()
  • Synchronization between threads using synchronized
  • Deadlocks

Code

  • DailyAdviceClient – DailyAdviceServer
  • Writing a chat-client
  • Improved Chat client using Threads
  • Code Kitchen: making the beat box networked

Chapter 16: Data Structures

Concepts

  • Sorting using Collections.sort()
  • Collection classes other than ArrayList
  • Changing the jukebox to use Songs instead of strings
  • Working with Generics – Generic Classes, Generic methods
  • extends in Generics
  • using Comparable to make sort() work on objects
  • using a custom Comparator
  • Updating Jukebox to use Comparator
  • Eliminating duplicates – working with Set
  • The Collection API(part of it)
  • Using HashSet instead of ArrayList
  • Working with TreeSet
  • Using a Map
  • Using polymorphic arguments and generics
  • Using wildcard

Code

  • Tracking song popularity on your jukebox

CChapter 17: Release your code

CConcepts

  • Deploying your application
  • Creating Jar files
  • Working with Packages and avoiding name conflicts
  • Compiling and running with Packages
  • Creating an executable JAR with Packages
  • Java Web Start
  • Steps for making and deploying a Java Web Start app

Chapter 18: Distributed Computing

Concepts

  • Method calls and heap
  • A design for remote method calls
  • Role of ‘helpers’
  • How remote method call works
  • Java RMI – getting the helpers
  • Step by step instructions on making a remote service and remote client
  • Introduction to Servlets
  • Introduction to Enterprise JavaBeans
  • A little Jini, adaptive discovery

Code

  • Servlet friendly Phrase-O-Matic
  • Final Project: UNIVERSAL SERVICE BROWSER

Appendix A: Final Code Kitchen

Appendix B: Top Ten Things That Did Not Make Into This Book

Reviewer: Krish Bhargav


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.