Tải bản đầy đủ (.pdf) (7 trang)

This document is created with the unregistered version of CHM2PDF Pilot

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (32.77 KB, 7 trang )

<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1></div>
<span class='text_page_counter'>(2)</span><div class='page_container' data-page=2>

Beginning Java 2, SDK 1.4 Edition


by Ivor Horton ISBN:0764543652


Wrox Press • • 2 0 0 3 (1156 pages)


This book outlines everything the beginning programmer
needs to know to program with the Java programming
language and the 1.4 Java Developer Kit. With the
release of JDK 1.4, programmers can look forward to
achieving better performance than ever.


Table of Contents


Beginning Java 2, SDK 1.4 Edition
Ch


apt
er
1


- Introducing Java


Ch
apt
er
2


- Programs, Data, Variables, and Calculation


Ch


apt
er
3


- Loops and Logic


Ch
apt
er
4


- Arrays and Strings


Ch
apt
er
5


- Defining Classes


Ch
apt
er
6


- Extending Classes and Inheritance


Ch
apt
er


7
- Exceptions
Ch
apt
er
8


- Understanding Streams


Ch
apt
er
9


- Accessing Files and Directories


Ch
apt
er
10


- Writing Files


Ch
apt
er
11


- Reading Files



Ch
apt
er
12


- Serializing Objects


Ch
apt
er
13


- Collection Classes


Ch
apt
er
14


- A Collection of Useful Classes


Ch
apt
er
15
- Threads
Ch
apt
er
16



- Creating Windows


Ch
apt
er
17


- Handling Events


Ch
apt
er
18


- Drawing in a Window


Ch
apt
er
19


- Extending the GUI


Ch
apt
er
20


- Filing and Printing Documents



Ch
apt
er
21


- Java and XML


Ch
apt
er
22


- Creating and Modifying XML Documents


Ap
pe
ndi
x
A
- Keywords
Ap
pe
ndi
x
B


- Computer Arithmetic


Ind


ex
of


- Data types, Keywords and Operators


Ind
ex
of


</div>
<span class='text_page_counter'>(3)</span><div class='page_container' data-page=3>

<b>Beginning Java 2, SDK 1.4</b>


<b>Edition</b>



<b>Ivor Horton </b>
<b>Wrox Press Ltd. đ</b>


â 2002 Wrox Press


All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form
or by any means, without the prior written permission of the publisher, except in the case of brief quotations


embodied in critical articles or reviews.


The author and publisher have made every effort in the preparation of this book to ensure the accuracy of the
information. However, the information contained in this book is sold without warranty, either express or implied.
Neither the authors, Wrox Press, nor its dealers or distributors will be held liable for any damages caused or alleged
to be caused either directly or indirectly by this book.


Published by Wrox Press Ltd,


Arden House, 1102 Warwick Road, Acocks Green,


Birmingham, B27 6BH, UK


Printed in the United States


ISBN 1-861005-69-5


<b>Trademark Acknowledgements </b>


Wrox has endeavored to provide trademark information about all the companies and products mentioned in this
book by the appropriate use of capitals. However, Wrox cannot guarantee the accuracy of this information.


<b>Credits </b>


</div>
<span class='text_page_counter'>(4)</span><div class='page_container' data-page=4>

Ivor Horton Steve Baker


Robert Chang


<b>Technical Editors </b> Phil Powers De George


Mankee Cheng Justin Foley


Shivanand Nadkarni David Hudson


Girish Sharangpani Jim MacIntosh


Roberts Shaw Craig McQueen


Andrew Tracey Karen Ritchie


Gavin Smyth



<b>Commissioning Editors </b> John Timney


Louay Fatoohi David Whitney


Chanoch Wiggers


<b>Index </b> <b>Production Coordinator </b>


John Collins Natalie O'Donnell


Andrew Criddle


</div>
<span class='text_page_counter'>(5)</span><div class='page_container' data-page=5>

<b>Project Manager </b> Pippa Wonson


Emma Batch Rachel Taylor


<b>Proof Readers </b> <b>Cover Design </b>


Lisa Stephenson Chris Morris


Fiona Berryman


Agnes Wiggers


Keith Westmooreland


Cover photograph by John Wright Photography, Warwick


<b>A Note from the Author </b>



<i>In all my Beginning books, my objective is to minimize what, in my judgment, are the three main hurdles the aspiring</i>
programmer must face: getting to grips with the jargon that pervades every programming language and environment,
<i>understanding the use of the language elements (as opposed to what they are), and appreciating how the language is</i>
applied in a practical context.


Jargon is an invaluable and virtually indispensable means of communication for the competent amateur as well as the
expert professional, so it can't be avoided. My approach is to ensure that the beginner understands what the jargon
means and gets comfortable with using it in context. In that way, they can use the documentation that comes along
with most programming products more effectively, and can also feel competent to read and learn from the literature
that surrounds most programming languages.


Comprehending the syntax and effects of the language elements are obviously essential to learning a language, but I
<i>believe illustrating how the language features work and how they are used are equally important. Rather than just use</i>
code fragments, I always try to provide the reader with practical working examples that show the relationship of each
language feature to specific problems. These can then be a basis for experimentation, to see at first hand the effects of
changing the code in various ways.


The practical context needs to go beyond the mechanics of applying individual language elements. To help the


beginner gain the competence and confidence to develop their own applications, I aim to provide them with an insight
into how things work in combination and on a larger scale than a simple example with a few lines of code. That's why
I like to have at least one working example that builds over several chapters. In that way it's possible to show


</div>
<span class='text_page_counter'>(6)</span><div class='page_container' data-page=6>

StartDocument(), 1033


StartElement(), 1033


StartPrefixMapping(), 1034, 1041



startsWith(), 147, 153, 368


stateChanged(), 883


stop(), 602, 721


stringWidth(), 670


subList(), 514


substring(), 155, 157


sum(), 705


synchronizedList(), 638, 640


tan(), 59


Thread(), 604


toArray(), 515


toCharArray(), 159


toDegrees(), 60


toLowerCase(), 150


toRadians(), 60



toString(), 141, 167, 212, 244, 253, 254, 256, 267, 276, 346, 361, 367, 437, 518, 527, 529, 530, 1057, 1061,


1063, 1081


toUpperCase(), 151


transferFrom(), 450, 451, 455


transferTo(), 450, 451, 455


translate(), 658, 659, 904, 961, 965


trim(), 159


trimToSize(), 511


tryLock(), 466, 467, 469


union(), 660


update(), 557, 560, 836, 899


validatePage(), 977


valueChanged(), 879, 880


valueOf(), 141, 299, 348


values(), 537, 538



wait(), 253, 632, 633, 636


warning(), 1042, 1056


whitespaceChars(), 341


windowActivated(), 738, 951


windowClosed(), 738, 951


windowClosing(), 738, 742, 951


windowDeactivated(), 738, 951


windowDeiconified(), 738, 951


windowGainedFocus(), 738


windowIconified(), 738, 951


windowLostFocus(), 738


windowOpened(), 738, 951


windowStateChanged(), 738


wordChars(), 341


wrap(), 428, 1082



write(), 385, 403<i> 5, </i>424, 456, 1082


writeByte(), 476


writeBytes(), 477


writeChar(), 476


writeChars(), 477


writeDouble(), 476, 932


</div>
<span class='text_page_counter'>(7)</span><div class='page_container' data-page=7>

writeInt(), 476


writeLong(), 476


writeObject(), 47577, 480, 481, 488, 489, 932


writeShort(), 476


</div>

<!--links-->

×