Java Examples in a Nutshell
Home > Computing and Information Technology > Computer programming / software engineering > Web programming > Java Examples in a Nutshell: (In a Nutshell)
Java Examples in a Nutshell: (In a Nutshell)

Java Examples in a Nutshell: (In a Nutshell)


     0     
5
4
3
2
1



International Edition


X
About the Book

The author of the best-selling Java in a Nutshell has created an entire book of real-world Java programming examples that you can learn from. If you learn best "by example," this is the book for you. This third edition covers Java 1.4 and contains 193 complete, practical examples: over 21,900 lines of densely commented, professionally written Java code, covering 20 distinct client-side and server-side APIs. It includes new chapters on the Java Sound API and the New I/O API. The chapters on XML and servlets have been rewritten to cover the latest versions of the specifications and to demonstrate best practices for Java 1.4. New and updated examples throughout the book demonstrate many other new Java features and APIs. Java Examples in a Nutshell is a companion volume to Java in a Nutshell, Java Foundation Classes in a Nutshell, and Java Enterprise in a Nutshell. It picks up where those quick references leave off, providing a wealth of examples for both novices and experts. This book doesn't hold your hand; it simply delivers well-commented working examples with succinct explanations to help you learn and explore Java and its APIs. Java Examples in a Nutshell contains examples that demonstrate: Core APIs, including I/O, New I/O, threads, networking, security, serialization, and reflection; Desktop APIs, highlighting Swing GUIs, Java 2D graphics, preferences, printing, drag-and-drop, JavaBeans, applets, and sound; Enterprise APIs, including JDBC (database access), JAXP (XML parsing and transformation), Servlets 2.4, JSP 2.0 (JavaServer Pages), and RMI. The book begins with introductory examples demonstrating structured and object-oriented programming techniques for new Java programmers. A special index at the end of the book makes it easy to look up examples that use a particular Java class or accomplish a desired task. In between, each chapter includes exercises that challenge readers and suggest further avenues for exploration.

Table of Contents:
Preface; I. Learning Java; 1. Java Basics Hello World; FizzBuzz; The Fibonacci Series; Using Command-Line Arguments; Echo in Reverse; FizzBuzz Switched; Computing Factorials; Recursive Factorials; Caching Factorials; Computing Big Factorials; Handling Exceptions; Interactive Input Using a StringBuffer; Sorting Numbers; Computing Primes; 2. Objects, Classes, and Interfaces; A Rectangle Class Testing the Rect Class; A Rect Subclass; Another Subclass; Complex Numbers Computing Statistics An Integer List; Tokenizing Text; II. Core Java APIs; 3. Input/Output; Files and Streams; Working with Files; Copying File Contents; Reading and Displaying Text Files; Listing Directory and File Information; Compressing Files and Directories; Filtering Character Streams; Tokenizing a Character Stream; Random Access to Files; 4. Threads; Thread Basics; Thread-Safe Classes; Threads and Thread Groups; Deadlock; Timers; 5. Networking; Downloading the Contents of a URL; Using a URLConnection; Sending Email Through a URLConnection; A Simple Network Client; A Generic Client; An HTTP Client; A POP Client; A Simple Web Server; A Proxy Server; A Generic Multithreaded Server; Sending Datagrams; Receiving Datagrams; 6. New I/O Locking Files; Copying Files; Regular Expressions and Character Decoding; File Copying with Buffers; Advanced Byte-to-Character Conversion; Tokenizing Byte Buffers; A Simple HTTP Client; The Daytime Service; A Multiplexed Server; A Multiplexed Network Client; 7. Security and Cryptography; Running Untrusted Code; Loading Untrusted Code; Message Digests and Digital Signatures; Cryptography; 8. Internationalization; A Word About Locales; Unicode; Character Encodings; Handling Local Customs; Localizing User-Visible Messages; Formatted Messages; 9. Reflection; Obtaining Class and Member Information; Invoking a Named Method; Proxy Objects; 10. Object Serialization; Simple Serialization; Custom Serialization; Externalizable Classes; Serialization and Class Versioning; III. Desktop Java APIs; 11. Graphical User Interfaces; Components; Containers; Layout Management; Event Handling; A Complete GUI; Actions and Reflection; Custom Dialogs; An Error Handler Dialog; Displaying Tables; Displaying Trees; A Simple Web Browser; Describing GUIs with Properties; Themes and the Metal Look-and-Feel; Look-and-Feel Preferences; The ShowBean Program; 12. Graphics; Graphics Before Java 1.2; The Java 2D API; Drawing and Filling Shapes; Transforms; Line Styles with BasicStroke; Stroking Lines; Filling Shapes with Paint; Antialiasing; Combining Colors with AlphaComposite; Image Processing; Image I/O; Custom Shapes; Custom Strokes; Custom Paint; Advanced Animation; Displaying Graphics Examples; 13. Printing; Printing with the Java 1.1 API; Printing with the Java 1.2 API; Printing with the Java 1.4 API; Printing Multipage Text Documents; Advanced Printing with Java 1.4; 14. Data Transfer; Simple Swing Data Transfer; A Clock with Drag and Copy Support; Data Transfer Architecture; Droppin

About the Author :
David Flanagan is a computer programmer who spends most of his time writing about JavaScript and Java. His books with O'Reilly include Java in a Nutshell, Java Examples in a Nutshell, Java Foundation Classes in a Nutshell, JavaScript: The Definitive Guide, and JavaScript Pocket Reference. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and son in the U.S. Pacific Northwest between the cities of Seattle, Washington and Vancouver, British Columbia.

Review :
"This essential, learn-as-you-go tutorial invites new and seasoned Java developers to let go of worries about the complexity and sophistication of Java and simply jump in and try effective new programming techniques and code. It's a very good place to start if you're thinking of trying something new." Industrial Networking & Open Contol, April 2004 "This is not, perhaps, for the gnarled old 'sandals and beard' developer at the back of the office, but if you're a junior developer, or perhaps a highly experienced developer moving into Java for the first time, you won't find much better reading, and doing, than this." - Davey Winder, PC Plus, Nov (Rating 9/10)


Best Sellers


Product Details
  • ISBN-13: 9780596006204
  • Publisher: O'Reilly Media
  • Publisher Imprint: O'Reilly Media
  • Height: 227 mm
  • No of Pages: 700
  • Returnable: 00
  • Spine Width: 33 mm
  • ISBN-10: 0596006209
  • Publisher Date: 24 Feb 2004
  • Binding: Paperback
  • Language: English
  • Returnable: Y
  • Series Title: In a Nutshell
  • Width: 154 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Java Examples in a Nutshell: (In a Nutshell)
O'Reilly Media -
Java Examples in a Nutshell: (In a Nutshell)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Java Examples in a Nutshell: (In a Nutshell)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!