Schildt - The Art of Java (McGraw, 2003).pdf
(
3284 KB
)
Pobierz
19074858 UNPDF
The Art of Java
Herbert Schildt, James Holmes
McGraw-Hill
/Osborne
New York Chicago San Francisco
Lisbon London Madrid Mexico City Milan
New Delhi San Juan Seoul Singapore Sydney Toronto
McGraw-Hill
/Osborne
2100 Powell Street, 10
th
Floor
Emeryville, California 94608
U.S.A.
To arrange bulk purchase discounts for sales promotions, premiums, or fund-raisers, please contact
McGraw-Hill/Osborne at the above address. For information on translations or book distributors
outside the U.S.A., please see the International Contact Information page immediately following the
index of this book.
The Art of Java
Copyright © 2003 by The McGraw-Hill Companies. All rights reserved. Printed in the United States
of America. Except as permitted under the Copyright Act of 1976, no part of this publication may be
reproduced or distributed in any form or by any means, or stored in a database or retrieval system,
without the prior written permission of publisher, with the exception that the program listings may be
entered, stored, and executed in a computer system, but they may not be reproduced for publication.
1234567890 FGR FGR 019876543
ISBN 0-07-222971-3
Publisher
Brandon A. Nordin
Vice President & Associate Publisher
Scott Rogers
Editorial Director
Wendy Rinaldi
Project Editor
Jennifer Malnick
Acquisitions Coordinator
Athena Honore
Technical Editor
James Holmes
Copy Editor
Emily Rader
Proofreader
Emily Hsuan
Indexer
Sheryl Schildt
Composition
Tara A. Davis, Lucie Ericksen
Illustrators
Kathleen Fay Edwards, Melinda Moore Lytle, Lyssa Wald
Series Designer
Roberta Steele
Cover Designer
Jeff Weeks
This book was composed with Corel VENTURA™ Publisher.
Information has been obtained by McGraw-Hill/Osborne from sources believed to be reliable. However, because of the possibility of
human or mechanical error by our sources, McGraw-Hill/Osborne, or others, McGraw-Hill/Osborne does not guarantee the accuracy,
adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use
of such information.
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
Chapter 1
The Genius of Java
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
Simple Types and Objects: The Right Balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Memory Management Through Garbage Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
A Wonderfully Simple Multithreading Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Fully Integrated Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Streamlined Support for Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Portability and Security Through Bytecode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
The Richness of the Java API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
The Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
The Continuing Revolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Chapter 2
A Recursive-Descent Expression Parser
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
Parsing Expressions: The Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
Parsing an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
Dissecting an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
A Simple Expression Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
Understanding the Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
Adding Variables to the Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
Syntax Checking in a Recursive-Descent Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
A Calculator Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
Some Things to Try . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
Chapter 3
Implementing Language Interpreters in Java
. . . . . . . . . . . . . . . . . . . . . . . . . .
39
What Computer Language to Interpret? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
An Overview of the Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
The Small BASIC Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
The Small BASIC Expression Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
Small BASIC Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
Small BASIC Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
The Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
The InterpreterException Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
The SBasic Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
iii
Plik z chomika:
walbo48
Inne pliki z tego folderu:
Cole - Planetary Science - Science of Planets Around Stars (IOP, 2002).pdf
(8299 KB)
Einstein's Space-Time - An Intro to Special and General Relativity - R. Ferraro (Springer, 2007) WW.pdf
(8617 KB)
Frolov - Black Hole Physics - Basic Concepts and New Developments (Kluwer, 1997).pdf
(26556 KB)
Falcke - The Galactic Black Hole (IOP, 2003).pdf
(19940 KB)
Elements of Space Technology - R. Meyer (AP, 1999) WW.djvu
(2924 KB)
Inne foldery tego chomika:
ksiazki
Schematy spawarek
Amaterske Radio_2009.rar
))) Przyśpiewki weselne
@Excel
Zgłoś jeśli
naruszono regulamin