Book description
Java programming language and basic packages
Server-side libraries and enterprise development
Networking, Beans, and collections
GUI components and more
Covers Java 2 platform (JDK 1.4 release) and enterprise/server-side development.
An international bestseller for over 5 years, Just Java 2 is the most comprehensive and accessible tutorial for programmers at all levels. Completely updated and revised, the 5th edition is not only a readable and engaging overview of the Java 2 platform (JDK 1.4 release) and its libraries, it is also a practical introduction to today's best enterprise and server-side programming techniques.
Writing for real programmers, author Peter van der Linden delivers expert advice, clear explanations and challenging examples, along with his popular "light relief" sidebars and wry commentary on the computer industry.
Just Java 2 covers:
The core language: advantages, syntax, object-oriented features, and key techniques-including interfaces, threads, assert statements, and much more
Key Java libraries: Input/output, from the basics to cutting-edge pattern matching, file locking, and mapped I/O techniques-plus a full chapter data structures and collections
Server-side Java technology: Powerful techniques for building Web-based transaction systems and Web services: servlets, Java Server Pages(tm), RMI, object serialization, and more
Client-side Java technology: Up-to-the-minute coverage of JFC(tm)/Swing GUI development, applet techniques, games code, containers, layouts, and graphics programming
Enterprise Java technology: J2EE(tm) platform-capabilities, benefits, and techniques! Including a database introduction, JDBC(tm) API tutorial, basics of EJB(tm) architecture, Java platform security, and a brand-new chapter on XML
CD-ROM INCLUDES
Browse the CD with your Web browser to run the applets and to get easy access to the contents
Tons of great software, including Perl, GNU C/C++, Python, games, and more
Extensive code examples from top programmers around the world
The complete programmer's FAQ
Table of contents
- Copyright
- Acknowledgments
- Using the Just Java CD-ROM
-
I. Language
- 1. What Is Java?
- 2. The Story of O: Object-Oriented Programming
- 3. Explanation of a Sample Program
- 4. Identifiers, Keywords, and Types
- 5. Names, Arrays, Operators, and Accuracy
- 6. More OOP—Extending Classes
-
7. Java Statements
- “Organizing” Statements
- Expression Statements
- Selection Statements
- Iteration Statements
- Transfer of Control Statements
-
Exceptions
- The Purpose of Exceptions
- How to Cause an Exception (Implicitly and Explicitly)
- Triggering an Exception
- How to Handle (“Catch”) an Exception Within the Method Where It Was Thrown
- Handling Groups of Related Exceptions
- How the Exception Propagates If Not Handled in the Method Where It Was Thrown
- How and Why Methods Declare the Exceptions That Can Propagate Out of Them
- Fancy Exception Stuff
- Summary of Exceptions
- The Assert Statement
- Further Reading
- Exercises
- Some Light Relief—MiniScribe: The Hard Luck Hard Disk
- 8. Interfaces
- 9. Packages and Visibility
- 10. Doing Several Things at Once: Threads
- 11. Advanced Thread Topics
- 12. Practical Example Explained
-
II. Key Libraries
-
13. Simple Input Output
- Design Philosophy
- File and FileDescriptor Classes
- Output
- Outputting Double-byte Characters
- Other Writer Wrappers
- Outputting ASCII Characters and Binary Values
- Input
- Reader Wrappers
- Inputting ASCII Characters and Binary Values
- Input Stream Wrappers
- Further Reading
- Exercises
- Some Light Relief—The Illegal Prime Number!
- 14. Advanced Input Output
- 15. Regular Expressions , Collections , Utilities
-
13. Simple Input Output
-
III. Server-side Java
-
16. Servlets and JSP
- Why Use Servlets?
- Releases and Versions
- Installing the Tomcat Software
- Running the Example Servlets
- Ports and Protocols
- The HTML to Invoke a Servlet
- A Servlet and Its Request/response
- Servlet Request
- Response to a Servlet Request
- Writing Your Own Servlet
- Servlet Operating Cycle and Threading
- Java Server Pages
- Java Beans in Servlets and JSP
- Further Reading
- Exercises
- Some Light Relief—The Java-Powered Toaster
-
17. Networking in Java
- Everything You Need To Know about TCP/IP but Failed to Learn in Kindergarten
- A Client Socket in Java
- Sending Email by Java
- A Server Socket in Java
- HTTP and Web Browsing: Retrieving HTTP Pages
- How to Make an Applet Write a File on the Server
- A Multithreaded HTTP Server
- A Mapped I/O HTTP Server
- Further Reading
- Exercises
- Some Light Relief—Using Java to Stuff an Online Poll
- 18. Remote Method Invocation
-
16. Servlets and JSP
-
IV. Client Java
- 19. GUI Basics and Event-Handling
- 20. All About Applets
- 21. JFC and the Swing Package
- 22. Containers, Layouts, and AWT Loose Ends
-
V. Enterprise Java
-
23. Java Beans in Theory
- What Is Component Software?
- What Is a Java Bean?
- Properties and Events
- Coding Time, Design Time, Runtime
- Refresher on Events
- Bean Conventions
- Install the Beanbox
- Run a Demo Bean
- Customizing Bean Properties
- Connecting a Button to a Method in Another Bean
- Activation Framework and Infobus
- Limitations of Beans
- Enterprise Java Beans (EJB)
- Using EJB in an Application Server
- EJB Summary
- Further Reading
- Exercises
- Some Light Relief—Furby’s Brain Transplant
-
24. Java Beans in Practice
- The Specification for Two Beans
- The Code for the ConverterField Bean
- The Code for DoItButton Bean
- Compile, Jar, and Load Classes into Beanbox
- Bean Icons
- The Bean Info Class
- Descriptor Classes
- Properties
- Bound Properties
- Property Change Support for Non-Visual Beans
- Summary: Telling Another Bean About a Change in One of Your Values
- Connecting a Swing Event to a Method in Another Bean
- Hidden State
- The Completed, Integrated Rate Calculator
- Customizing More Complicated Properties
- Constrained Properties
- Calling a Method in Another Bean—Don’t Do It!
- Exercises
- Some Light Relief—Java’s Duke Mascot
- Complete Code Listings
-
25. Java Security
- The Sandbox
- Code Signing
- The Security Manager
- Applying the Security Policy
-
Signing a Java Program
- Step 1: Setup for Applet Signing (One-Time)
- Step 2: Put All the Files That Make up the Applet into a Jar File
- Step 3: Create a Signed Jar File
- Step 4: Change the Applet Tag
- Step 5: The Person Who Runs the Applet Must Import My Certificate
- Step 6: Set up a Security Policy for the User, Allowing Signed Code
- Step 7: Run the Code Using the Policy File
- Some Light Relief—Software About Nothing
- Further References
-
26. Relational Databases and SQL
- Introduction to Relational Databases
- Primary and Foreign Keys
- 1-Many, Many-Many Relationships
- Normal Forms
- Relational Database Glossary
- Basic SQL Primer
- Creating and Populating Tables
- Querying and Retrieving Data
- Subquery Selections
- Result Set of a SELECT Query
- Updating Values
- Deleting Records and Tables
- SQL Prepared Statements and Stored Procedures
- Further Reading
- Exercises
- Some Light Relief—Reading the Docs
-
27. JDBC
- Downloading and Installing the Software
- Running the Example Code
- Connecting to the Database
- Executing SQL Statements
- Result Sets
- Batching SQL Statements and Transactions
- Transactions
- Prepared Statements and Stored Procedures
- Complete Example
- Database and Result Set Metadata
- Further Reading
- Exercises
- Light Relief—Hear Java Speak! See Java on a PDA!
-
28. XML and Java
- Some Rules of XML
- The Document Type Definition (DTD)
- What Is XML Used For?
- XML Versions and Glossary
- JAXP Library Contents
- Reading XML with DOM Parsers
- A Program That Uses a DOM Parser
- Reading an XML File—SAX Parsers
- A Program That Uses a SAX Parser
- The Factory Design Pattern
- Design Pattern Summary
- Other Java XML Notes
- Download and Install the Java XML Software (JAXP)
- Running the Example Code
- Further Reading
- Exercises
- Some Light Relief—“View Source” on Kevin’s Life
-
23. Java Beans in Theory
- A. Graphics Programming
- B. Obsolete Components of the Abstract Window Toolkit
- C. Powers of 2 and ISO 8859
Product information
- Title: Just Java™ 2, Fifth Edition
- Author(s):
- Release date: December 2001
- Publisher(s): Pearson
- ISBN: 9780130320728
You might also like
book
Just Java™ 2
The #1 introduction to J2SE 1.5 and enterprise/server-side development! An international bestseller for eight years, is …
book
PURE Java™ 2
Pure Java 2 is a substantial and focused reference for professional Java programmers. This book begins …
book
15 Dangerously Mad Projects for the Evil Genius
UNLEASH YOUR INNER MAD SCIENTIST! "Wonderful. I learned a lot reading the detailed but easy to …
book
30 BeagleBone Black Projects for the Evil Genius
Fiendishly Fun Ways to Use the BeagleBone Black! This wickedly inventive guide shows you how to …