📄 intro.htm
字号:
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I66'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I67>
</FONT><A NAME="_Toc481064458"></A><BR></P></DIV>
<A NAME="Heading13"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
Source code</H2></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">All the source code for this book is
available as copyrighted freeware, distributed as a single package, by visiting
the Web site <I>www.BruceEckel.com</I>. To make sure that you get the most
current version, this is the official site for distribution of the code and the
electronic version of the book. You can find mirrored versions of the electronic
book and the code on other sites (some of these sites are found at
<I>www.BruceEckel.com</I>), but you should check the official site to ensure
that the mirrored version is actually the most recent edition. You may
distribute the code in classroom and other educational
situations.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I67'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I68>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The primary goal of the copyright is to
ensure that the source of the code is properly cited, and to prevent you from
republishing the code in print media without permission. (As long as the source
is cited, using examples from the book in most media is generally not a
problem.)
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I68'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I69>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">In each <A NAME="Index7"></A>source code
file you will find a reference to the following copyright
notice:
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I69'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I70>
</FONT><BR></P></DIV>
<BLOCKQUOTE><FONT SIZE = "+1"><PRE>//:! :CopyRight.txt
Copyright ©2000 Bruce Eckel
Source code file from the 2nd edition of the book
"Thinking in Java." All rights reserved EXCEPT as
allowed by the following statements:
You can freely use this file
for your own work (personal or commercial),
including modifications and distribution in
executable form only. Permission is granted to use
this file in classroom situations, including its
use in presentation materials, as long as the book
"Thinking in Java" is cited as the source.
Except in classroom situations, you cannot copy
and distribute this code; instead, the sole
distribution point is http://www.BruceEckel.com
(and official mirror sites) where it is
freely available. You cannot remove this
copyright and notice. You cannot distribute
modified versions of the source code in this
package. You cannot use this file in printed
media without the express permission of the
author. Bruce Eckel makes no representation about
the suitability of this software for any purpose.
It is provided "as is" without express or implied
warranty of any kind, including any implied
warranty of merchantability, fitness for a
particular purpose or non-infringement. The entire
risk as to the quality and performance of the
software is with you. Bruce Eckel and the
publisher shall not be liable for any damages
suffered by you or any third party as a result of
using or distributing software. In no event will
Bruce Eckel or the publisher be liable for any
lost revenue, profit, or data, or for direct,
indirect, special, consequential, incidental, or
punitive damages, however caused and regardless of
the theory of liability, arising out of the use of
or inability to use software, even if Bruce Eckel
and the publisher have been advised of the
possibility of such damages. Should the software
prove defective, you assume the cost of all
necessary servicing, repair, or correction. If you
think you've found an error, please submit the
correction using the form you will find at
www.BruceEckel.com. (Please use the same
form for non-code errors found in the book.)
///:~</PRE></FONT></BLOCKQUOTE>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">You may use the code in your projects and
in the classroom (including your presentation materials) as long as the
copyright notice that appears in each source file is
retained.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I70'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I71>
</FONT><A NAME="_Toc312373775"></A><A NAME="_Toc375545183"></A><A NAME="_Toc481064459"></A><BR></P></DIV>
<A NAME="Heading14"></A><FONT FACE = "Verdana"><H3 ALIGN="LEFT">
Coding standards<BR><A NAME="Index8"></A><A NAME="Index9"></A></H3></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">In the text of this book, identifiers
(function, variable, and class names) are set in <B>bold</B>. Most keywords are
also set in bold, except for those keywords that are used so much that the
bolding can become tedious, such as
“class.”
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I71'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I72>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">I use a particular coding style for the
examples in this book. This style follows the style that Sun itself uses in
virtually all of the code you will find at its site (see
<I>java.sun.com/docs/codeconv/index.html</I>), and seems to be supported by most
Java development environments. If you’ve read my other works, you’ll
also notice that Sun’s coding style coincides with mine—this pleases
me, although I had nothing to do with it. The subject of formatting style is
good for hours of hot debate, so I’ll just say I’m not trying to
dictate correct style via my examples; I have my own motivation for using the
style that I do. Because Java is a free-form programming language, you can
continue to use whatever style you’re comfortable
with.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I72'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I73>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The programs in this book are files that
are included by the word processor in the text, directly from compiled files.
Thus, the code files printed in the book should all work without compiler
errors. The errors that <I>should</I> cause compile-time error messages are
commented out with the comment <B>//! </B>so they can be easily discovered and
tested using automatic means. Errors discovered and reported to the author will
appear first in the distributed source code and later in
<A NAME="Index10"></A><A NAME="Index11"></A>updates of the book (which will also
appear on the Web site
<I>www.BruceEckel.com</I>).
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I73'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I74>
</FONT><A NAME="_Toc312373778"></A><A NAME="_Toc375545184"></A><A NAME="_Toc481064460"></A><BR></P></DIV>
<A NAME="Heading15"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
Java versions<BR><A NAME="Index12"></A><A NAME="Index13"></A></H2></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">I generally rely on the Sun
implementation of Java as a reference when determining whether behavior is
correct.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I74'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I75>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Over time, Sun has released three major
versions of Java: 1.0, 1.1 and 2 (which is called version 2 even though the
releases of the JDK from Sun continue to use the numbering scheme of 1.2, 1.3,
1.4, etc.). Version 2 seems to finally bring Java into the prime time, in
particular where user interface tools are concerned. This book focuses on and is
tested with Java 2, although I do sometimes make concessions to earlier features
of Java 2 so that the code will compile under Linux (via the Linux JDK that was
available at this writing).
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I75'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I76>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">If you need to learn about earlier
releases of the language that are not covered in this edition, the first edition
of the book is freely downloadable at <I>www.BruceEckel.com</I> and is also
contained on the CD that is bound in with this
book.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I76'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I77>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">One thing you’ll notice is that,
when I do need to mention earlier versions of the language, I don’t use
the sub-revision numbers. In this book I will refer to Java 1.0, Java 1.1, and
Java 2 only, to guard against typographical errors produced by further
sub-revisioning of these
products.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I77'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I78>
</FONT><A NAME="_Toc481064461"></A><BR></P></DIV>
<A NAME="Heading16"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
Seminars and mentoring</H2></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">My company provides five-day, hands-on,
public and in-house
<A NAME="Index14"></A><A NAME="Index15"></A><A NAME="Index16"></A>training
seminars based on the material in this book. Selected material from each chapter
represents a lesson, which is followed by a monitored exercise period so each
student receives personal attention. The audio lectures and slides for the
introductory seminar are also captured on CD ROM to provide at least some of the
experience of the seminar without the travel and expense. For more information,
go to
<I>www.BruceEckel.com</I>.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I78'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I79>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">My company also provides consulting,
mentoring and walkthrough services to help guide your project through its
development cycle—especially your company’s first Java project.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I79'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I80>
</FONT><A NAME="_Toc312373779"></A><A NAME="_Toc375545185"></A><A NAME="_Toc481064462"></A><BR></P></DIV>
<A NAME="Heading17"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
Errors<BR><A NAME="Index17"></A><A NAME="Index18"></A><A NAME="Index19"></A></H2></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">No matter how many tricks a writer uses
to detect errors, some always creep in and these often leap off the page for a
fresh reader.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I80'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I81>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">There is an error submission form linked
from the beginning of each chapter in the HTML version of this book (and on the
CD ROM bound into the back of this book, and downloadable from
<I>www.BruceEckel.com</I>) and also on the Web site itself, on the page for this
book.<I> </I>If you discover anything you believe to be an error, please use
this form to submit the error along with your suggested correction. If
necessary, include the original source file and note any suggested
modifications. Your help is
appreciated.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I81'
target="_blank">Add Comment</a> ]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -