📄 intro.htm
字号:
arrays and more sophisticated containers (data structures) such as <B>ArrayList
</B>and <B>HashMap</B>.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I49'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I50>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Chapter 10: Error Handling with
Exceptions</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The basic philosophy of Java is that
badly-formed code will not be run. As much as possible, the compiler catches
problems, but sometimes the problems—either programmer error or a natural
error condition that occurs as part of the normal execution of the
program—can be detected and dealt with only at run-time. Java has
<I>exception handling</I> to deal with any problems that arise while the program
is running. This chapter examines how the keywords <B>try</B>, <B>catch</B>,
<B>throw</B>, <B>throws</B>, and <B>finally</B> work in Java; when you should
throw exceptions and what to do when you catch them. In addition, you’ll
see Java’s standard exceptions, how to create your own, what happens with
exceptions in constructors, and how exception handlers are located.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I50'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I51>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Chapter 11: The Java I/O System
</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Theoretically, you can divide any program
into three parts: input, process, and output. This implies that I/O
(input/output) is an important part of the equation. In this chapter
you’ll learn about the different classes that Java provides for reading
and writing files, blocks of memory, and the console. The distinction between
“old” I/O and “new” Java I/O will be shown. In addition,
this chapter examines the process of taking an object, “streaming”
it (so that it can be placed on disk or sent across a network) and
reconstructing it, which is handled for you with Java’s <I>object
serialization</I>. Also, Java’s compression libraries, which are used in
the Java ARchive file format (JAR), are
examined.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I51'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I52>
</FONT><A NAME="OLE_LINK9"></A><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Chapter 12: Run-Time Type
Identification</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Java run-time type identification (RTTI)
lets you find the exact type of an object when you have a reference to only the
base type. Normally, you’ll want to intentionally ignore the exact type of
an object and let Java’s dynamic binding mechanism (polymorphism)
implement the correct behavior for that type. But occasionally it is very
helpful to know the exact type of an object for which you have only a base
reference. Often this information allows you to perform a special-case operation
more efficiently. This chapter explains what RTTI is for, how to use it, and how
to get rid of it when it doesn’t belong there. In addition, this chapter
introduces the Java <I>reflection</I>
mechanism.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I52'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I53>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Chapter 13: Creating Windows and
Applets</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Java comes with the “Swing”
GUI library, which is a set of classes that handle windowing in a portable
fashion. These windowed programs can either be applets or stand-alone
applications. This chapter is an introduction to Swing and the creation of World
Wide Web applets. The important “JavaBeans” technology is
introduced. This is fundamental for the creation of Rapid-Application
Development (RAD) program-building
tools.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I53'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I54>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Chapter 14: Multiple Threads
</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Java provides a built-in facility to
support multiple concurrent subtasks, called <I>threads</I>, running within a
single program. (Unless you have multiple processors on your machine, this is
only the <I>appearance</I> of multiple subtasks.) Although these can be used
anywhere, threads are most apparent when trying to create a responsive user
interface so, for example, a user isn’t prevented from pressing a button
or entering data while some processing is going on. This chapter looks at the
syntax and semantics of multithreading in Java.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I54'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I55>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Chapter 15: Distributed Computing
</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">All the Java features and libraries seem
to really come together when you start writing programs to work across networks.
This chapter explores communication across networks and the Internet, and the
classes that Java provides to make this easier. It introduces the very important
concepts of <I>Servlets </I>and <I>JSPs</I> (for server-side programming),
along<I> with Java DataBase Connectivity</I> (JDBC), and <I>Remote Method
Invocation</I> (RMI). Finally, there’s an introduction to the new
technologies of <I>JINI</I>, <I>JavaSpaces</I>, and <I>Enterprise JavaBeans</I>
(EJBs).
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I55'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I56>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Appendix A: Passing & Returning
Objects</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Since the only way you talk to objects in
Java is through references, the concepts of passing an object into a function
and returning an object from a function have some interesting consequences. This
appendix explains what you need to know to manage objects when you’re
moving in and out of functions, and also shows the <B>String</B> class, which
uses a different approach to the
problem.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I56'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I57>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Appendix B: The Java Native
Interface (JNI)</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">A totally portable Java program has
serious drawbacks: speed and the inability to access platform-specific services.
When you know the platform that you’re running on, it’s possible to
dramatically speed up certain operations by making them <I>native methods</I>,
which are functions that are written in another programming language (currently,
only C/C++ is supported). This appendix gives you enough of an introduction to
this feature that you should be able to create simple examples that interface
with non-Java code.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I57'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I58>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Appendix C: Java Programming
Guidelines</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">This appendix contains suggestions to
help guide you while performing low-level program design and writing
code.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I58'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I59>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia"><B><I>Appendix D: Recommended
Reading</I></B></FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">A list of some of the Java books
I’ve found particularly
useful.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I59'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I60>
</FONT><A NAME="_Toc312373773"></A><A NAME="_Toc375545181"></A><A NAME="_Toc481064456"></A><BR></P></DIV>
<A NAME="Heading11"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
Exercises</H2></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">I’ve discovered that simple
exercises are exceptionally useful to complete a student’s understanding
during a seminar, so you’ll find a set at the end of each
chapter.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I60'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I61>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Most exercises are designed to be easy
enough that they can be finished in a reasonable amount of time in a classroom
situation while the instructor observes, making sure that all the students are
absorbing the material. Some exercises are more advanced to prevent boredom for
experienced students. The majority are designed to be solved in a short time and
test and polish your knowledge. Some are more challenging, but none present
major challenges. (Presumably, you’ll find those on your own—or more
likely they’ll find
you).
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I61'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I62>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Solutions to selected exercises can be
found in the electronic document <I>The Thinking in Java Annotated Solution
Guide</I>, available for a small fee from
www.BruceEckel.com.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I62'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I63>
</FONT><A NAME="_Ref310733137"></A><A NAME="_Toc312373774"></A><A NAME="_Toc375545182"></A><A NAME="_Toc481064457"></A><BR></P></DIV>
<A NAME="Heading12"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
Multimedia CD ROM</H2></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">There are two multimedia CDs associated
with this book. The first is bound into the book itself: <I>Thinking in C</I>,
described at the end of the preface, which prepares you for the book by bringing
you up to speed on the necessary C syntax you need to be able to understand
Java.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I63'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I64>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">A second<I>
<A NAME="Index5"></A><A NAME="Index6"></A></I>Multimedia CD ROM is available,
which is based on the contents of the book. This CD ROM is a separate product
and contains the <B>entire</B> contents of the week-long “Hands-On
Java” training seminar. This is more than 15 hours of lectures that I have
recorded, synchronized with hundreds of slides of information. Because the
seminar is based on this book, it is an ideal
accompaniment.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I64'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I65>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The CD ROM contains all the lectures
(with the important exception of personalized attention!) from the five-day
full-immersion training seminars. We believe that it sets a new standard for
quality.
</backtalk:display>
[ <a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_INTRO_I65'
target="_blank">Add Comment</a> ]
<backtalk:display ID=TIJ3_INTRO_I66>
</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">The Hands-On Java CD ROM is available
only by ordering directly from the Web site
<I>www.BruceEckel.com</I>.
</backtalk:display>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -