📄 preface.htm
字号:
pleasant for me. However, every now and then someone will have complaints, and
for some reason one complaint that comes up periodically is “the book is
too big.” In my mind it is faint damnation indeed if “too many
pages” is your only complaint. (One is reminded of the Emperor of
Austria’s complaint about Mozart’s work: “Too many
notes!” Not that I am in any way trying to compare myself to Mozart.) In
addition, I can only assume that such a complaint comes from someone who is yet
to be acquainted with the vastness of the Java language itself, and has not seen
the rest of the books on the subject—for example, my favorite reference is
Cay Horstmann & Gary Cornell’s <I>Core Java</I> (Prentice-Hall), which
grew so big it had to be broken into two volumes. Despite this, one of the
things I have attempted to do in this edition is trim out the portions that have
become obsolete, or at least nonessential. I feel comfortable doing this because
the original material remains on the Web site and the CD ROM that accompanies
this book, in the form of the freely-downloadable first edition of the book (at
<I>www.BruceEckel.com</I>). If you want the old stuff, it’s still there,
and this is a wonderful relief for an author. For example, you may notice that
the original last chapter, “Projects,” is no longer here; two of the
projects have been integrated into other chapters, and the rest were no longer
appropriate. Also, the “Design Pattens” chapter became too big and
has been moved into a book of its own (also downloadable at the Web site). So,
by all rights the book should be
thinner.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I10'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I11>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">But alas, it is not to
be.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I11'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I12>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The biggest issue is the continuing
development of the Java language itself, and in particular the expanding APIs
that promise to provide standard interfaces for just about everything
you’d like to do (and I won’t be surprised to see the
“JToaster” API eventually appear). Covering all these APIs is
obviously beyond the scope of this book and is a task relegated to other
authors, but some issues cannot be ignored. The biggest of these include
server-side Java (primarily Servlets & Java<STRIKE> </STRIKE>Server pages,
or <I>JSP</I>s), which is truly an excellent solution to the World Wide Web
problem, wherein we’ve discovered that the various Web browser platforms
are just not consistent enough to support client-side programming. In addition,
there is the whole problem of easily creating applications to interact with
databases, transactions, security, and the like, which is involved with
Enterprise Java Beans (EJBs). These topics are wrapped into the chapter formerly
called “Network Programming” and now called “Distributed
Computing,” a subject that is becoming essential to everyone. You’ll
also find this chapter has been expanded to include an overview of Jini
(pronounced “genie,” and it isn’t an acronym, just a name),
which is a cutting-edge technology that allows us to change the way we think
about interconnected applications. And of course the book has been changed to
use the Swing GUI library throughout. Again, if you want the old Java 1.0/1.1
stuff you can get it from the freely-downloadable book at
<I>www.BruceEckel.com</I> (it is also included on this edition’s new CD
ROM, bound into the book; more on that a little
later).
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I12'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I13>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Aside from additional small language
features added in Java 2 and corrections made throughout the book, the other
major change is in the collections chapter (9), which now focuses on the Java 2
collections used throughout the book. I’ve also improved that chapter to
more deeply go into some of the important issues of collections, in particular
how a hash function works (so that you can know how to properly create one).
There have been other movements and changes, including a rewrite of Chapter 1,
and removal of some appendices and other material that I consider no longer
necessary for the printed book, but those are the bulk of them. In general,
I’ve tried to go over everything, remove from the 2<SUP>nd</SUP> edition
what is no longer necessary (but which still exists in the electronic first
edition), include changes, and improve everything I could. As the language
continues to change—albeit not quite at the same breakneck pace as
before—there will no doubt be further editions of this
book.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I13'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I14>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">For those of you who still can’t
stand the size of the book, I do apologize. Believe it or not, I have worked
hard to keep it small. Despite the bulk, I feel like there may be enough
alternatives to satisfy you. For one thing, the book is available electronically
(from the Web site, and also on the CD ROM that accompanies this book), so if
you carry your laptop you can carry the book on that with no extra weight. If
you’re really into slimming down, there are actually Palm Pilot versions
of the book floating around. (One person told me he would read the book in bed
on his Palm with the backlighting on to keep from annoying his wife. I can only
hope that it helps send him to slumberland.) If you need it on paper, I know of
people who print a chapter at a time and carry it in their briefcase to read on
the
train.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I14'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I15>
</FONT><A NAME="_Toc481064448"></A><BR></P></DIV>
<A NAME="Heading3"></A><FONT FACE = "Verdana"><H3 ALIGN="LEFT">
Java 2</H3></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">At this writing, the release of
Sun’s <I>Java Development Kit </I>(JDK) 1.3 is imminent, and the proposed
changes for JDK 1.4 have been publicized. Although these version numbers are
still in the “ones,” the standard way to refer to any version of the
language that is JDK 1.2 or greater is to call it “Java 2.” This
indicates the very significant changes between “old
Java”—which had many warts that I complained about in the first
edition of this book—and this more modern and improved version of the
language, which has far fewer warts and many additions and nice
designs.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I15'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I16>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">This book is written for Java 2. I have
the great luxury of getting rid of all the old stuff and writing to only the
new, improved language because the old information still exists in the
electronic 1<SUP>st</SUP> edition on the Web and on the CD ROM (which is where
you can go if you’re stuck using a pre-Java-2 version of the language).
Also, because anyone can freely download the JDK from java.sun.com, it means
that by writing to Java 2 I’m not imposing a financial hardship on someone
by forcing them to upgrade.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I16'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I17>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">There is a bit of a catch, however. JDK
1.3 has some improvements that I’d really like to use, but the version of
Java that is currently being released for Linux is JDK 1.2.2. Linux (see
www.Linux.org) is a very important development in conjunction with Java, because
it is fast becoming the most important server platform out there—fast,
reliable, robust, secure, well-maintained, and free, a true revolution in the
history of computing (I don’t think we’ve ever seen all of those
features in any tool before). And Java has found a very important niche in
server-side programming in the form of <I>Servlets</I>, a technology that is a
huge improvement over the traditional CGI programming (this is covered in the
“Distributed Programming”
chapter).
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I17'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I18>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">So although I would like to only use the
very newest features, it’s critical that everything compiles under Linux,
and so when you unpack the source code and compile it under that OS (with the
latest JDK) you’ll discover that everything will compile. However, you
will find that I’ve put notes about features in JDK 1.3 here and
there.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I18'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I19>
</FONT><A NAME="_Toc481064449"></A><BR></P></DIV>
<A NAME="Heading4"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
The CD ROM</H2></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Another bonus with this edition is the CD
ROM that is packaged in the back of the book. I’ve resisted putting CD
ROMs in the back of my books in the past because I felt the extra charge for a
few Kbytes of source code on this enormous CD was not justified, preferring
instead to allow people to download such things from my Web site. However,
you’ll soon see that this CD ROM is
different.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I19'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I20>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The CD does contain the source code from
the book, but it also contains the book in its entirety, in several electronic
formats. My favorite of these is the HTML format, because it is fast and fully
indexed—you just click on an entry in the index or table of contents and
you’re immediately at that portion of the
book.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I20'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I21>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The bulk of the 300+ Megabytes of the CD,
however, is a full multimedia course called <I>Thinking in C: Foundations for
C++ & Java. </I>I originally commissioned Chuck Allison to create this
seminar-on-CD ROM as a stand-alone product, but decided to include it with the
second editions of both <I>Thinking in C++</I> and <I>Thinking in Java</I>
because of the consistent experience of having people come to seminars without
an adequate background in C. The thinking apparently goes “I’m a
smart programmer and I don’t <I>want</I> to learn C, but rather C++ or
Java, so I’ll just skip C and go directly to C++/Java.” After
arriving at the seminar, it slowly dawns on folks that the prerequisite of
understanding C syntax is there for a very good reason. By including the CD ROM
with the book, we can ensure that everyone attends a seminar with adequate
preparation.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I21'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_PREFACE_I22>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The CD also allows the book to appeal to
a wider audience. Even though Chapter 3 (Controlling program flow) does cover
the fundamentals of the parts of Java that come from C, the CD is a gentler
introduction, and assumes even less about the student’s programming
background than does the book. It is my hope that by including the CD more
people will be able to be brought into the fold of Java programming.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_PREFACE_I22'
target="_blank">Add Comment</a> ]
</FONT><BR></P></DIV>
<HR><DIV ALIGN="LEFT"><P><A NAME="fn1" HREF="#fnB1">[1]</A><FONT FACE="Georgia" SIZE=2>
I take this back on the 2<SUP>nd</SUP> edition: I believe that the Python
language comes closest to doing exactly that. See
www.Python.org.</FONT><BR></P></DIV>
<DIV ALIGN="CENTER">
<FONT FACE="Verdana" size = "-1">
[ <a href="FrontMtr.htm">Previous Chapter</a> ]
[ <a href="SimpCont.htm">Short TOC</a> ]
[ <a href="Contents.htm">Table of Contents</a> ]
[ <a href="DocIdx.htm">Index</a> ]
[ <a href="Intro.htm">Next Chapter</a> ]
</FONT>
<BR>
Last Update:05/21/2001</P></DIV>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -