Review: Sams Teach Yourself Java in 24 Hours
Iain Laskey tried his hand at Java
| Product | Sams Teach Yourself Java in 24 Hours |
|---|---|
| Company | Sams |
| Web | www.informit.com/sams |
| Price | From £25.99 |
| We like | clear, excellent presentation, easy to read. |
| We don't like | A bit more depth would be nice |
| Rating | 9/10 |
| Requirements |
Over the years I've used a great many languages on a great many platforms but one which I've managed to avoid until now has been Java. Whilst it's not quite as hot as it once was, it's still used a lot in a large number of organisations so I figured it was time to give it a go.
One thing that put me off before was the confusing number of variations and buzzwords. What was a bean? JAX-WS? Swing? I decided it was time to give it a try.
Sams Teach Yourself Java in 24 Hours by Roger Cadenhead is now in its fifth edition with the cover proudly proclaiming coverage of Java 6, full colour (or color) and free access to the Online Learning Lab.
A quick flick through created a good impression with nice clear presentation, colour coded chapters and lots of clear illustrations and mercifully short listings.
The book is set up as 24 one hour chapters with a short Q&A at the end. The Q&A's are worth doing, not only because they help cement your learning but also because they often feature some random questions that have nothing to do with Java(!) but do have interesting answers.
The first chapter contains a short overview of programming and what it involves and provides a gentle start for those who are starting from cold. The second chapter uses the free NetBeans IDE to write a very simple program, just to show how the basics work and how to compile your Java code into something that will actually do something. By the end, you'll have compiled a class file, know about the main statement and had a taste of variables.
Chapter three provides some useful background on the language, where it came from, why and contains some examples of the sort of applications that can be built with it. You'll also find out a bit about the world of Java and what exists to support it.
From here, the book builds nicely introducing features in a logical and clear way. Not surprisingly, these include decision making, loops, variables and the like. By chapter ten things get a bit more interesting as the concepts of object orientated programming are covered followed by creating objects, methods and related variables.
Chapter 13 starts to look at more visual applications with an introduction to Swing, a collection of Java classes that are used to create forms, buttons, sliders, text fields and the like. The book moves on to handling user interaction via mouse or keyboard and chapters 14 and 15 build a simple lottery application based on the work to date.
A short chapter on building and running a Java applet in a web browser is followed by how to handle errors or exceptions in Java parlance. For many people, Java running in a web browser will be their target platform so I was a little disappointed by how high level this chapter was.
The rest of the book covers file handling, XML reading/writing and threads. Chapter 22 is particular interesting as it shows how to create web services with JAX-WS. Things finish off with simple graphics for charts and the like and finally, a browser based game.
The appendices cover the basics of using the NetBeans IDE but more usefully, other Java resources such as books and web sites you can check out when you're ready to dig deeper.
Conclusion
On balance, I liked this book a lot. The authors style is extremely clear and I liked the way he used short snippets to discuss concepts before providing a complete listing to compile and run. As a complete beginner, I did feel that by the end I had grasped the basics of Java. There's a lot of useful background material too which helped answer a lot of the questions I tend to ask when starting a new language. On the down side, it doesn't cover anything in any real depth so is best consider a starting point only. However, this is true of nearly all beginners guides. At the time of writing, Amazon is doing a very good price on this book so in value for money terms, it's a winner too.

