Part of O'Reilly's definitive set of Java documentation,Learning Java introduces the basics of Java, the object-oriented programming language for networked applications from Sun Microsystems. This book provides a broad survey of the Java 2 Standard Edition and contains everything necessary to get up to speed quickly. It covers the essentials of hot topics like Swing and JFC; describes new tools for signing applets and other Java classes; and shows how to write networked clients and servers, servlets, JavaBeans, and state-of-the-art user interfaces.Java started out as a tool for creating animated web pages, but it's proven to be much more. Java is now used for everything from sophisticated web clients to mission-critical enterprise applications. In the future, Java will become the basis for a new generation of distributed software that runs on devices ranging from cell phones to supercomputers. In the practical, hands-on approach characteristic of O'Reilly, Learning Java demonstrates why Java is now the language of choice for building the next generation of computer software.Includes a CD-ROM containing the example code and JBuilder for Windows and Solaris.Learning Java covers:
History and principles of Java
How to write simple applets and applications
How to integrate applets into the World Wide Web
Java Fundamental Class (JFC) and Swing Libraries
Network programming with sockets
Remote Method Invocation
Creating a security policy
Chapter 1 Yet Another Language?
A Virtual Machine
Java Compared with Other Languages
Safety of Design
Safety of Implementation
Application and User-Level Security
Java and the World Wide Web
Java as a General Application Language
A Java Road Map
Chapter 2 A First Application
HelloJava2: The Sequel
HelloJava3: The Button Strikes!
HelloJava4: Netscape’s Revenge
Chapter 3 Tools of the Trade
The Java Interpreter
The Class Path
The Java Compiler
Java Archive (JAR) Files
Chapter 4 The Java Language
Statements and Expressions
Chapter 5 Objects in Java
Chapter 6 Relationships Among Classes
Subclassing and Inheritance
Packages and Compilation Units
Visibility of Variables and Methods
Arrays and the Class Hierarchy
Chapter 7 Working with Objects and Classes
The Object Class
The Class Class
Chapter 8 Threads
Threads in Applets
Scheduling and Priority
Chapter 9 Basic Utility Classes
The Security Manager
Chapter 10 Input/Output Facilities
Chapter 11 Network Programming with Sockets and RMI
Jonathan Knudsen is an author at O'Reilly & Associates. His books include The Unofficial Guide to Lego Mindstorms Robots, Java 2D Graphics, and Java Cryptography. He is the Courseware Writer for LearningPatterns.com.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animals on the cover of Learning Java, are a Bengal tigress and her cubs. The Bengal tiger (Panthera tigris) lives in Southern Asia where it has been hunted practically to extinction principally for its bone, which is reputed to have medicinal value. It now lives mostly in natural preserves and national parks where it is strictly protected. It's estimated that there are less than 3,000 Bengal tigers left in the wild.The Bengal tiger is reddish orange with narrow black, gray, or brown stripes, generally in a vertical direction. Males can grow to nine feet long and weigh as much as 500 pounds; they are the largest existing members of the cat family. Preferred habitats include dense thickets, long grass, or tamarisk shrubs along river banks. Maximum longevity can be 26 years but is usually only about 15 years in the wild.Tigers most commonly conceive after the monsoon rains; the majority of cubs are born between February and May after a gestation of three and a half months. Females bear single litters every two to three years. Cubs weigh under three pounds at birth and are striped. Litters consist of one to four cubs, with occasionally as many as six, but it's unusual for more than two or three to survive. Cubs are weaned at four to six months but depend on their mother for food and protection for another two years. Female tigers are mature at three to four years, males at four to five years.Their white ear spots may help mothers and cubs to keep track of each other in the dim forests at night. Nicole Arigo was the production editor for Learning Java. Nancy Kotary was the copyeditor, and Norma Emory proofread the book. Darren Kelly, Colleen Gorman, and Jane Ellin provided quality control. Ellen Troutman wrote the index. This colophon was compiled by Mary Anne Weeks Mayo.Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image is an original engraving from the book Forest and Jungle: An Illustrated History of the Animal Kingdom by P.T. Barnum (1899). Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font. David Futato designed the CD-ROM label.Alicia Cech designed the interior layout based on a series design by Nancy Priest. The heading font is Bodoni BT; the text font is New Baskerville. Mike Sierra implemented the design in FrameMaker 5.5. The illustrations that appear in the book were produced by Robert Romano and Rhon Porter using Macromedia FreeHand 8 and Adobe Photoshop 5.Whenever possible, our books use RepKover(TM), a durable and flexible lay-flat binding. If the page count exceeds RepKoverÂ¹s limit, perfect binding is used.
I have both Exploring Java(The first edition) and learning Java. I love these books. O'Reilly in general are very very good and they have taken a fair amount of my money and this book is not only full of cynical little snippets of geek humour but it actually goes at a pace that neither bores me to death nor goes over the top in tech detail.
It's not for someone who has never programmed before and he does mention the occaisional C/C++ thing (pointers, class and method creation) that can throw someone who is a complete newcomer but this book isn't for them in any case.
I would just like to thank the authors. Today I needed some IO code and voila, 5 minutes of reading and I was on my way. that is what is so brilliant about this book: it points you in the right direction without fuss or boredom.
To the guy further down who posted about test.class and test$.class etc. This is mentioned in the book. It's what the compiler does to get around some paradoxes with inner classes and is mentioned in the discusion on that topic.
Despite the easy reading, a giant cork stopped my plans before I even delved into the depths of the book. The included jbuilder software is version 1.2, but to even run HelloJava1.java, version 1.3 is required.
Don't you check these things before shipping out the final copy?
Well...the picture shown is not the book cover I have (2nd ed, perhaps?) - but it's still the same book.
Overall, I found this to be one of my "keep in the stack next to the monitor" books. As is usual with O'Reilly books, it is fast-paced without too much dry, technical jargon or useless fluff. The authors assume a strong C/C++ background, and as they explain many concepts in terms of C and C++, I would not recommend this as a guide for "first-time" programmers. However, for those who have mucked about with C++ (or similar OO languages), it's a great introduction to Java.
The book includes a copy of JBuilder but proceeds to discuss the programming directly with the JDK, using commands like javac and java to compile and run programs. Personally, I've used most of the "big-name" Java IDEs and program with a text editor and the JDK myself, so it wasn't a big deal for me. However, the inclusion of JBuilder implies that the reader should be coding with it - and this is a problem, because the book mentions nothing about its use...and JBuilder is feature-rich to the point of overkill.
The initial examples (the obligatory "Hello World!" programs) and written and explained quite well. The examples in chapter 16 of the various Layouts are also done well - and have the added advantage of being generic enough to use for base programs to build on. In the core chapters (ie 4+), I would have appreciated some more examples. I don't mean redundant examples of the same thing (such as the long list of GridBag samples in chapter 16) - noone likes reading a book that has more code than text - but I would have appreciated a little more exploration into the uses of various classes/functions/etc.
My biggest beef is the lack of technical discussion of Java's compilation process. If the chapter 4 examples are done as shown, upon compile, some create a single FILENAME.class file, whereas other create the FILENAME.class file plus a FILENAME$1.class file - and sometimes a FILENAME$2.class file as well. There is nothing ANYWHERE in the book that mentions these extra files (they're not even mentioned in section on building JARs!). Trial and error has shown that these files are necessary to run the compiled classes - so it would seem appropriate that they deserve explanation. (As a side note, I have several books on Java (including some from Sun) and none of them mention these extra files. O'Reilly in the past has been extremely good at catching the little details like this that other authors/publishers miss - which is why I value O'Reilly books over any other CS books (well, in general). It is a shame that this one slipped by.
There is also a fairly long list of errata for this book - as well as an even longer list of "unconfirmed" errata - that apparently is only appended to and does not get checked by the publishers, as there are many blantantly-needed corrections that should be "confirmed" that have been in the "unconfirmed" file for over a year now.
Don't let my gripes discourage you though. If you have some OO programming background (especially C++) and are looking to learn Java, this book is an excellent choice. As I always tell anyone buying computer books, "You can't go wrong with O'Reilly unless you don't know what subject you're looking for."
So far, I'm aggravated. I must admit I have not gotten very far. I'm stuck at the beginning of chapter 2 attempting to get my first scrawny little read-write program to run.
The book comes with a very fancy Borland product, JBuilder 3.5. The book assumes you know how to use it already! This is a rather silly notion, as we would not need the book if we were already proficient at Java! The software's help functions are typical of Windows applications: not much help at all. Error messages are not indexed, all are done as slow-loading HTML files, and many answers are only available on-line.
Judging from their pictures, I was doing Fortran before the authors were born, have mastered many computer languages, and I adore Borland's Turbo Pascal. I'm no newbie, but I'm having to bang my head against a very poorly-thought-out software install system and a lack of bootstrapping instruction in its use.
I suspect, if I can ever get past this, my opinion will rise sharply.
Learning Java is an excellent book covering a broad range of topics taking the reader beyond the basics. Coverage of the associated tools as well as the overview of the Java language and objects is well explained for anyone with knowledge of C/C++. The more advanced topics such as Threads, Network Programming and RMI are well presented.
The examples are well thought out and explained, and with access to the source code and tools on the CD it is possible to start using Java almost immediately.
This is a first rate book for anyone with existing C and C++ skills needing to know Java.
Learning Java is a good book for those who have some prior experience with an object oriented language like C++. It covers the basics quickly, more in a review or "how Java differs from C++" style.
The book does lack solid examples, especially in a few of the middle chapters (Chapters 4,5,6) on classes. In Chapters 1 and 2, you start and build upon a typical "Hello, Java" application - I liked that, but wished it would have started smaller and continued throught the book. That way, once the book was finished the reader would have a nice collection of code that .
Small, practical assignments would have also been a nice plus. Most online or book learning methods for programming include silly applications that no one would ever use. The "Hello, Java" application in this book is pretty good because it shows the use of GUIs which are commonly used. I know O'Reilly publishes a book of Java examples but I have not read that one yet.
A little something on JDBC would have supplemented the content of the book nicely.
From the outset this book is a breath of fresh air. The authors swift yet thorough style ensures that the reader is left in no doubt as to how the examples work, and, more importantly, why the technique or feature described is desirable or useful.
The general layout of this book allows for very easy reading, so all concentration can be on the job at hand rather than understanding the authors meaning on a subject. Also, topics are introduced when first needed, but may not e fully explained until a later chapter. This gived the reader a chance to see the basics of a class or method, without being bogged down by the complexities of it until it is required.
On the whole, a very well though out book, with most everything a new or intermediate Java programmer needs. Although a small amount of experience is useful in other languages such as C and C++ are useful, an overview of the basics of any programming language, down to MS-DOS Batch or Unix shell scripts is enough. A definite must for anyone setting out or wanting to learn more.
Not for a complete programmer newbie, this book has all you need to get a very thorough grounding in Java. Neither too many examples, nor too much technical dry speak. And of course the authors dry wit to bring a chuckle every now and then.
This book was very good, although it isn't for the newbie programmer. I have a basic understanding of C/C++, and that is pretty much required to be able to understand the book.
But, the examples are clear and the explanations make sense. It is also fast paced ... trusting the reader to re-read something to get a point rather than produce example after example on the same subject.