Preface | p. ix |
The Genius of Java | p. 1 |
Simple Types and Objects: The Right Balance | p. 2 |
Memory Management Through Garbage Collection | p. 3 |
A Wonderfully Simple Multithreading Model | p. 4 |
Fully Integrated Exceptions | p. 5 |
Streamlined Support for Polymorphism | p. 5 |
Portability and Security Through Bytecode | p. 6 |
The Richness of the Java API | p. 6 |
The Applet | p. 7 |
The Continuing Revolution | p. 8 |
A Recursive-Descent Expression Parser | p. 9 |
Expressions | p. 10 |
Parsing Expressions: The Problem | p. 11 |
Parsing an Expression | p. 12 |
Dissecting an Expression | p. 13 |
A Simple Expression Parser | p. 17 |
Understanding the Parser | p. 24 |
Adding Variables to the Parser | p. 25 |
Syntax Checking in a Recursive-Descent Parser | p. 35 |
A Calculator Applet | p. 36 |
Some Things to Try | p. 38 |
Implementing Language Interpreters in Java | p. 39 |
What Computer Language to Interpret? | p. 40 |
An Overview of the Interpreter | p. 42 |
The Small BASIC Interpreter | p. 42 |
The Small BASIC Expression Parser | p. 64 |
Small BASIC Expressions | p. 64 |
Small BASIC Tokens | p. 65 |
The Interpreter | p. 70 |
The InterpreterException Class | p. 70 |
The SBasic Constructor | p. 70 |
The Keywords | p. 72 |
The run() Method | p. 73 |
The sbInterp() Method | p. 74 |
Assignment | p. 75 |
The PRINT Statement | p. 76 |
The INPUT Statement | p. 78 |
The GOTO Statement | p. 79 |
The IF Statement | p. 82 |
The FOR Loop | p. 82 |
The GOSUB | p. 85 |
The END Statement | p. 87 |
Using Small BASIC | p. 87 |
More Small BASIC Sample Programs | p. 88 |
Enhancing and Expanding the Interpreter | p. 90 |
Creating Your Own Computer Language | p. 90 |
Creating a Download Manager in Java | p. 91 |
Understanding Internet Downloads | p. 92 |
An Overview of the Download Manager | p. 93 |
The Download Class | p. 94 |
The Download Variables | p. 98 |
The Download Constructor | p. 98 |
The download() Method | p. 98 |
The run() Method | p. 99 |
The stateChanged() Method | p. 102 |
Action and Accessor Methods | p. 103 |
The ProgressRenderer Class | p. 103 |
The DownloadsTableModel Class | p. 104 |
The addDownload() Method | p. 106 |
The dearDownload() Method | p. 107 |
The getColumnClass() Method | p. 107 |
The getValueAt() Method | p. 108 |
The update() Method | p. 108 |
The DownloadManager Class | p. 109 |
The DownloadManager Variables | p. 115 |
The DownloadManager Constructor | p. 115 |
The verifyUrl() Method | p. 116 |
The tableSelectionChanged() Method | p. 117 |
The updateButtons() Method | p. 117 |
Handling Action Events | p. 119 |
Compiling and Running the Download Manager | p. 119 |
Enhancing the Download Manager | p. 120 |
Implementing an E-mail Client in Java | p. 121 |
E-mail Behind the Scenes | p. 122 |
POP3 | p. 123 |
IMAP | p. 123 |
SMTP | p. 123 |
The General Procedure for Sending and Receiving E-mail | p. 123 |
The JavaMail API | p. 124 |
An Overview of Using JavaMail | p. 124 |
A Simple E-mail Client | p. 125 |
The ConnectDialog Class | p. 126 |
The DownloadingDialog Class | p. 132 |
The MessageDialog Class | p. 134 |
The MessagesTableModel Class | p. 141 |
The EmailClient Class | p. 145 |
Compiling and Running the E-mail Client | p. 163 |
Expanding Beyond the Basic E-mail Client | p. 165 |
Crawling the Web with Java | p. 167 |
Fundamentals of a Web Crawler | p. 168 |
Adhering to the Robot Protocol | p. 169 |
An Overview of the Search Crawler | p. 171 |
The SearchCrawler Class | p. 172 |
The SearchCrawler Variables | p. 190 |
The SearchCrawler Constructor | p. 190 |
The actionSearch() Method | p. 191 |
The search() Method | p. 193 |
The showError() Method | p. 196 |
The updateStats() Method | p. 196 |
The addMatch() Method | p. 197 |
The verifyUrl() Method | p. 198 |
The isRobotAllowed() Method | p. 199 |
The downloadPage() Method | p. 202 |
The removeWwwFromUrl() Method | p. 203 |
The retrieveLinks() Method | p. 203 |
The searchStringMatches() Method | p. 210 |
The crawl() Method | p. 211 |
Compiling and Running the Search Web Crawler | p. 214 |
Web Crawler Ideas | p. 215 |
Rendering HTML with Java | p. 217 |
Rendering HTML with JEditorPane | p. 218 |
Handling Hyperlink Events | p. 219 |
Creating a Mini Web Browser | p. 220 |
The MiniBrowser Class | p. 221 |
The MiniBrowser Variables | p. 226 |
The MiniBrowser Constructor | p. 227 |
The actionBack() Method | p. 227 |
The actionForward() Method | p. 228 |
The actionGo() Method | p. 228 |
The showError() Method | p. 229 |
The verifyUrl() Method | p. 229 |
The showPage() Method | p. 230 |
The updateButtons() Method | p. 232 |
The hyperlinkUpdate() Method | p. 232 |
Compiling and Running the Mini Web Browser | p. 233 |
HTML Renderer Possibilities | p. 234 |
Statistics, Graphing, and Java | p. 235 |
Samples, Populations, Distributions, and Variables | p. 236 |
The Basic Statistics | p. 237 |
The Mean | p. 237 |
The Median | p. 238 |
The Mode | p. 239 |
Variance and Standard Deviation | p. 240 |
The Regression Equation | p. 242 |
The Correlation Coefficient | p. 243 |
The Entire Stats Class | p. 246 |
Graphing Data | p. 250 |
Scaling Data | p. 250 |
The Graphs Class | p. 251 |
The Graphs final and Instance Variables | p. 255 |
The Graphs Constructor | p. 257 |
The paint() method | p. 258 |
The bargraph() Method | p. 262 |
The scatter() Method | p. 262 |
The regplot() Method | p. 263 |
A Statistics Application | p. 263 |
The StatsWin Constructor | p. 268 |
The itemStateChanged() Handler | p. 269 |
The actionPerformed() Method | p. 270 |
The shutdown() Method | p. 270 |
The createMenu() Method | p. 271 |
The DataWin Class | p. 271 |
Putting Together the Pieces | p. 272 |
Creating a Simple Statistical Applet | p. 274 |
Some Things to Try | p. 276 |
Financial Applets and Servlets | p. 277 |
Finding the Payments for a Loan | p. 278 |
The RegPay Fields | p. 283 |
The init() Method | p. 283 |
The actionPerformed() Method | p. 286 |
The paint() Method | p. 286 |
The compute() Method | p. 287 |
Finding the Future Value of an Investment | p. 287 |
Finding the Initial Investment Required to Achieve a Future Value | p. 292 |
Finding the Initial Investment Needed for a Desired Annuity | p. 296 |
Finding the Maximum Annuity for a Given Investment | p. 301 |
Finding the Remaining Balance on a Loan | p. 305 |
Creating Financial Servlets | p. 310 |
Using Tomcat | p. 310 |
Converting the RegPay Applet into a Servlet | p. 311 |
The RegPayS Servlet | p. 311 |
Some Things to Try | p. 316 |
Al-Based Problem Solving | p. 317 |
Representation and Terminology | p. 318 |
Combinatorial Explosions | p. 320 |
Search Techniques | p. 322 |
Evaluating a Search | p. 322 |
The Problem | p. 322 |
A Graphic Representation | p. 323 |
The FlightInfo Class | p. 325 |
The Depth-First Search | p. 325 |
An Analysis of the Depth-First Search | p. 336 |
The Breadth-First Search | p. 336 |
An Analysis of the Breadth-First Search | p. 338 |
Adding Heuristics | p. 339 |
The Hill-Climbing Search | p. 340 |
An Analysis of Hill Climbing | p. 345 |
The Least-Cost Search | p. 346 |
An Analysis of the Least-Cost Search | p. 347 |
Finding Multiple Solutions | p. 348 |
Path Removal | p. 349 |
Node Removal | p. 350 |
Finding the "Optimal" Solution | p. 356 |
Back to the Lost Keys | p. 361 |
Index | p. 367 |
Table of Contents provided by Ingram. All Rights Reserved. |