CARVIEW |
By?Patrick Niemeyer, Jonathan Knudsen
Second Edition July 2002
Pages: 828 (More details)
(Average of 19 Customer Reviews)
This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.
The latest edition is also available on Safari Books Online.
This new edition of Learning Java has been expanded and updated for Java 2 Standard Edition SDK 1.4. It comprehensively addresses important topics such as web applications, servlets, and XML that are increasingly driving enterprise applications. This edition provides full coverage of all Java 1.4 language features including assertions and exception chaining as well as new APIs such as regular expressions and NIO, the new I/O package. New Swing features and components are described along with updated coverage of the JavaBeans component architecture using the open source NetBeans IDE the latest information about Applets and the Java Plug-in for all major web browsers.
Full Description
Register your book | View/Submit Errata | View/Submit Review | Examples | CD-ROM Contents
Browse within this book
Cover | Table of Contents | Index | Sample Chapter | Colophon
No time right now?

![]() Learn Object-Oriented Programming Using Java Learn Object-Oriented Programming concepts through Java applets in this beginner course. Read more | ![]() Open Source Programming Certificate Earn a University Certificate as you gain real-world experience in several LAMP and other open-source technologies. Read more | ![]() Java in a Nutshell Read more |
![]() Java Cookbook Read more |
Book details
Title:
Learning Java
Second Edition: July 2002
ISBN 10: 0-596-00285-8
ISBN 13: 9780596002855
Pages: 828
Average Customer Reviews: (Based on 19 Reviews)
Featured customer reviews
Name should change - not learning for Begineee
Rating:
2006-03-21 06:32:58
mahen
[Reply | View]
I think - Name should change because - for new biee this book gonna make no sense, because it start high level... will be bouncy so HighLevel Java start will be good name, insted of learning java..
Need File Handling in depth !
2005-05-04 00:20:50
Anonymous Reader
[Reply | View]
Need heavy work on IO and File Handling chapter 11 Section 2. Looks like Pat is in a hurry to tell that this is this and that is that. Overall Good on OO Concepts of Java and newer XML , JAXP chapters.
Not what I expected.
Rating:
2005-01-18 04:46:57
Ryo
[Reply | View]
This is a good book, but not what I expected.
I've read quite a few 'learning' books but this may be one of the worst, at least for my need. I think it is written well and comprehensible, but it's like listening to a 10 hour lecture of the language. Just listening. Most learning books have many hands-on examples that you can try yourself, and thus doing, you learn to write the code. This book, on the other hand, just keeps on going and going whithout letting us do something. How am I supposed to remember what I've read 100 pages ago without writing a single line of code?
Despite that, I think I'll keep this book. I may have to get another book to 'learn' Java, but this book seems like a very good reference book. Good book, but wrong title.
Someone mentioned 'Learning Perl' below. I totally agree with that person. That was the best learning book I've ever read! I really hope the publishers realize that and demand the authors same level of quality.
Antedote to (java) programming overcrowding?
Rating:
2004-08-05 19:28:54
randall
[Reply | View]
Ok now I've bleed off some of my excess cynicism, let me find something good to say about it.
Well ... actually it's chock-full of information ... overflowing ... so much so that it would've boosted my morale immensely if I could only have DONE something with it - like running the first example. A simple "hello world" would have bolstered my enthusiams through the next 100 pages
Not that I'm un-used to the complexity of web (or network) programming. Having tutored myself through at least 5 years of web design and development picking up the usual fare in the process. (javascript, CSS, perl, php, mysql and so on) I stepped back from Java in 97, for these more immediate considerations, and now have returned with serious intentions ... and so this book has tossed a little cold h2O on my head of steam, but I'll keep plugging away.
Sometimes I wonder if textbook authors believe that well-placed "errors" are essential if students are to learn to deal with the "real world." What a concept! Thanks but I've allready sorted out enough errata to last a lifetime. (Learning Java is far from unique in this regard btw, about average I'd say ... but still, the very first example!?!)
My thanks to all the others for posting thoughts that echo'd my sentiments so that I no longer feel quite so alone (or inept) a voice in the wilderness.
On a more positive note, the CD's NetBeans IDE, though dated, includes a comprehensive help section with TUTORIAL examples that may just save the day. At least so far the examples compile and run!
Could of been better
Rating:
2004-07-17 14:46:39
Brian Krupp - bkrupp@bw.edu
[Reply | View]
I agree with most of the reviews that this book is mainly for experienced programmers. It also seems to cover much more than it needs in a "Learning" book. If the book was divided into two separate books (Learning Java, and Advanced Java) it could still go into the depth that it does, and still be able to explain fully the current topics.
Mixed Review - continued
Rating:
2004-06-21 09:07:08
Ronit
[Reply | View]
I've got to up my rating. This book is proving to be an excellent resource!
Mixed Review
Rating:
2004-06-07 14:55:24
Ronit
[Reply | View]
Strong points:
1. Good swing explanation
2. Some fun classes included: e.g. java.awt.Robot, java.util.zip
3. servlet examples/war deployment/web.xml explanation were excellent
Weak points that really brought book down:
1. Examples needed improvement: more O'Reilly humour; more examples with greater depth (ie using many classes); fewer unfinished examples.
2. Where's the I/O? This is one of the first things that a programmer wants to learn. But it's buried, and poorly demonstrated, halfway through the book.
3. The writing is too tangled. Even as an experienced programmer, I read some lines and was left with "huh??". I agree with other readers that this book isn't for beginners.
4. Some sections are too wordy. E.g. the garbage collection section includes a whole paragraph of rhetoric on 'state-of-the-art techniques', then tells us not to worry ourselves about it (What's the algorithm?!).
So yeah, a decent book. Not its fault that Perl is just so much better... :)
Learning Java, 2nd Edition Review
Rating:
2004-01-22 20:29:10
Gary W
[Reply | View]
This book, as many have written below, is definitely not a "Learning" book, contrary to what the title implies. Having bought, read, and nearly worn out three of the O'Reilly Perl books (Learning Perl [Llama], Perl Programming [Camel], Perl Cookbook [Bighorn]), I was quite used to (dare I say "spoiled by") the very natural style and well-structured and well-paced writing of the authors of those books.
The first chapter in "Learning Java" is more like the Preface on steroids. Perhaps it was the preface, and someone lost control?. It basically gives a brief history of Java, and then tries to perform linguistic surgery by comparing various aspects of Java with those of other languages. Chapter two then dumps the reader into a seemingly simple program. Yes, it only displays "Hello Java" in a window, but it would help to explain the lines of the program from top to bottom, rather than skipping around. For example: import java.swing.*;, the first line of our simple program, isn't explained until much later (8 pages later!). The line "#!/usr/bin/perl", which is typically the first line of a Perl program, is explained very clearly almost immediately after it is introduced.
The writing style is also klunky: if you either don't already know Java, or don't know the authors' style, or both, it will be difficult to squeeze the right meaning out of what they write. i.e.- The reader should not have to even attempt to "read between the lines", especially not in a book that is meant to be introductory to the language..
My opinion overall: Not a Very Nice Book
Learning Java, 2nd Edition Review
Rating:
2003-11-29 23:33:59
JSidwell
[Reply | View]
As a constant user of computers who has dabbled in shell scripting, batch scripting and some minor excursions into perl, I thought I would probably find this book to be a very helpful tool in approaching java (for the second time). I was right, this book is a clear and concise entrance into the java language. I found the pace and complexity of the examples to be helpful and informative.
I would recommend this as a good place to start for someone who has already dabbled in programming (not necessarily with formal training) and is interested in getting started with java.
Unfortunately, I dissagree with some of the other reviewers in their criticism of the authors decision to not include complete installation instructions for java and the SDK. While this is a book by O'Reilly in their "learning" series, it is not designed to be a hand-holder for those who are not willing to dive in and figure things out. [flame goes here]
Thank you O'Reilly for supporting this book through it's second edition!
Learning Java, 2nd Edition Review
Rating:
2003-11-21 13:07:34
Mike Gershman
[Reply | View]
Please attach the rating to my review.
Learning Java, 2nd Edition Review
Rating:
2003-05-26 23:33:26
Phil
[Reply | View]
I really liked this book, but I think potential readers should be warned that it's really aimed at experienced programmers dabbling with Java rather than people learning Java as a first language. Perhaps Introducing Java would be a better title? The little bits of humour reminded me of my beloved Camel Book and were much appreciated.
Anyway, this book saved my life at university and is highly recommended. Just be sure you're comfortable with coding in general and the CLI before diving in.
Learning Java, 2nd Edition Review
Rating:
2003-05-15 10:38:58
Chris Badal
[Reply | View]
This is the best Java Book I have ever come across. It is a great book if you already know how to program a little. The author covers many aspects of Java. I constantly refer to this book when I want to see an example of how to do something. Its probably best for the intermediate programmer, experts may also find it useful, beginners may find it a little harder to follow.
Learning Java, 2nd Edition Review
Rating:
2003-05-12 20:15:10
Paul Whittemore
[Reply | View]
As a veteran programmer of several other languages, I found this to be a very well-written, careful and thorough book, at least for my needs. I do agree with the others somewhat that it lacks in the area of step-by-step instructions for those unfamiliar with computers, command lines, environment variables, etc. However, I can't take any marks of for that because the title is NOT "How To Use A Variety Of Operating Systems". Anyone who couldn't make it through the installer probably should learn other skills before Java programming. The other "tricky" part, setting an environment variable, is very platform dependent (and on many platforms, shell-dependent). Still, given the thoroughness of the other sections, if there is a 3rd Edition, that would be a useful addition to complete the package without bulking it up much.
I especially thought that the time spent in the first three chapters to introduce the Big Picture of Java development (before turning to language specifics) was an excellent decision. Many books cover the topic in detail without giving the reader an understanding of the Big Picture.
Also, every time the authors introduced something that I thought was unusual, just as I began to question it, I found that they would put an "aside" into the description explaining the issue that I found to be unexpected or unusual. Bonus marks for that.
On the negative side, I feel the skill level required to read this book and really understand it is too high for something called "Learning Java". There are many comparisons to other languages, and programming topics that may have no frame of reference to novice readers (e.g. heaps, process stacks, etc). As a veteran programmer, I appreciated all of this, however I would not recommend the book to anyone learning programming (in general) for the first time. I would highly recommend it to programmers with existing intermediate to veteran experience who would like to learn Java as a new language.
Learning Java, 2nd Edition Review
Rating:
2003-04-22 17:25:47
Rupert
[Reply | View]
I feel that the book is very good at getting across the fundamentals of the language, which is a very important building block of programming, unfortunately the part that most people scurry through and forget.
I do however agree with the other readers reviews that there should have been a short paragraph on how to install and run javac.exe and java.exe at the beginning of the book. As someone who works in the computer industry I was lucky enough to have friends that were able to point me in the right direction.
For those that do not have this luxury here's how to do it for Windows:
<blockquote>
Installation
- Place CD in CD-ROM</Li>
- Find j2sdk-1_4_0-win.exe in the directory D:\software\JavaSDK-1.4.0</Li>
- Double click on j2sdk-1_4_0-win.exe to install</Li>
- Take all default options through install wizard</Li>
If you followed the above directions the necessary software will be installed in C:\j2sdk1.4.0 on your computer.
Setting Environment Variables (Windows NT 4.0 and 2000)
- Right Mouse Click on the 'My Computer' icon on your desktop</Li>
- Select 'Properties'</Li>
- Select the 'Advanced' tab</Li>
- Select 'Environment Variables...'</Li>
- In the lower window marked 'System Variables' double click 'Path'</Li>
- In the text box named 'Variable Value:' move the cursor all the way to the right with the arrow keys</Li>
- Enter the following quoted string ";C:\j2sdk1.4.0\bin;C:\j2sdk1.4.0\jre\bin"</Li>
- It is very important you do not remove any of the other entries!</Li>
- Press 'OK' until you are back to your desktop</Li>
- Reboot your machine so that the new Environment Variables will take effect</Li>
It is not necessary to set the environment variables, however if you do not you will need to type the full path to javac.exe and java.exe every time you use it.
Running javac.exe and java.exe
- To compile type: 'javac.exe fileName.java'</Li>
- To execute compiled code: 'java.exe fileName'</Li>
- Note that there is no file extension used when running a compiled Java program</Li>
</blockquote>
Learning Java, 2nd Edition Review
Rating:
2003-04-17 15:36:36
P Sholar
[Reply | View]
The initial compilation error that these readers are reporting looks to be due to an invalid (or useless) setting of the SDK's CLASSPATH environment variable.
For an explanation, look about two-thirds down this page:
https://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html#2b
Setting up your SDK's environment variables is probably an expected thing (for experienced programmers) to have to do to work with an SDK. Too bad this isn't acknowledged at the very beginning of the book. It is explained later in the book. There you go.
--Paul
Learning Java, 2nd Edition Review
Rating:
2003-04-17 12:58:16
John
[Reply | View]
As others have stated, it's (supposed to be) a "Learning" book. One should start with the basics in this type of series -- including installing and setting up the Java SDK.
I too can not get the very first example to run (on Win2k), also receiving the 'Exception in thread "main" java.lang.NoClassDefFoundError: HelloJava' error. At least I just bought the book, and will take it back ASAP; I'll try one of the Wrox press books, as they are usually very well written.
Learning Java, 2nd Edition Review
Rating:
2003-03-17 05:22:56
Rudy
[Reply | View]
At the bottom of page 29 one reads "Now compile this source using the Java compiler, javac:
% javac HelloJava.java"
Huh. What's javac? Scrounge around a bit. Yep, reference is made to it in the index, and on page 73 one finds "...about javac, the Java compiler in the SDK." This gives a clue that in order to accomplish anything at all the SDK has to be installed, so install the SDK. Sure enough javac.exe appears.
Using any old editor enter the first, tiny, example the authors provide. This example, produced here for clarity, appears at the top of page 29.
"
public class HelloJava {
public static void main( String[] args) {
Systeml.out.println("Hello, Java!");
}
}
"
Following the authors' instructions, place it in a file called HelloJava.java.
In a DOS window type the line "% javac HelloJava.java" exactly as it appears in the book. An error message appears. Assuming that the authors did not really mean what they wrote, type instead the line "javac HelloJava.java" at the command prompt.
This time the following error message appears.
"Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools//javac/Main", and there we are, dead in the water at the very first place we are asked to try anything. Things didn't work the way we were told they would work, and the book provides not the slightest hint about what the problem might be.
I find it difficult to believe that my setup (Win NT 4.0 SP 5) is so unusual that that is what is causing the problem.
I read the first 2 chapters and, since I have been programming computers for about 35 years - and using C++ for about 15, nothing in those 2 chapters was difficult to understand. I don't know what it would be like for someone who had no experience with the object oriented paradigm - probably pretty difficult.
I'll get things working, but I will need something better than this book to get me going.
Finally, I liked the title, but, in the end, it turned out to be very misleading. It is difficult to learn anything, when the examples one is supposed to use don't work as advertised.
Learning Java, 2nd Edition Review
Rating:
2003-03-02 16:10:34
Rich
[Reply | View]
Book is OK but I was disappointed in the fact that from page one it has you writting your first Java program, compiling it and, executing it.......but it doesn't tell you how to do it. All it says is type this in and compile it. Type it into what? compile what? it assumes you know how to run the programs on the CD even though it doesn't tell you how to.
It's doesn't give you an idea of what you typing. It just says do it and gives no theory behind it or an explanation of what the syntax means.
It says that this is a book for everyone. Wrong......this is a book for people who already have a background in another language.
Learning Java, 2nd Edition Review
Rating:
2003-02-14 11:15:35
Mike
[Reply | View]
Very disappointing. I have lot's of O'Reilly books, it's just about
all a buy and "Learning Java" so few examples of code it's as dry as
moon dust. The Authors should ask Randal L. Schwartz & Tom Phoenix,
Author's of "Learning Perl" how to write a "leaning" book. That book
is excellent!
My suggestion is this, pull to book and rewrite it only this time do a little
work by actually programming in Java and including it in the book. The world does not need another Bjarne Stroustrup's type book (C++ Programming Language) which is what "Learning JAVA" is
If you have trouble sleeping, buy this book, it will put you to sleep
fast!
Media reviews
"['Learning Java'] is an excellent resource for anyone who wants to write their won applications. Clear explanations, lots of examples, and a logical, step-by-step approach make the book accessible even to those with little or no programming experience. Although the book is challenging, the effort is worth it: by the time you have finished this book, you will be will on your way to writing real-world Java applications."
--Scott Wahl, Technical Communication, May 2004 (Vol. 51:2)
"I would recommend you get a copy of this book if you are starting down the Java path."
--Thomas Duff, Portland Domino/Notes User Group, August 2003
https://www.valu.org/QuickPlace/pd-nug/Main.nsf/h_Discussion/80EE0D112DBF3F5886256D8600166006/?OpenDocument
"The most enjoyable aspect of this book is that it doesn't follow a cookie-cutter approach to teaching Java. Explanations of complicated subjects are spread throughout instead of being crammed into dedicated chapters. Best of all, the authors demonstrated some of Java's advanced utilities while teaching the fundamentals of the language."
--Joe Haynes, Bozeman Linux User Group, 9/25/02
https://www.bozemanlug.org/book-reviews/learning-java.html
-
- Browse within this book:
Cover | Table of Contents | Index | Sample Chapter | Colophon
- Browse within this book:
About O'Reilly | Contact | Jobs | Press Room | How to Advertise | Privacy Policy
© 2006, O'Reilly Media, Inc.
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.