Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Contents
Chapter 1: Introducing Java
What Is Java All About?
Features of the Java Language
Learning Java
The Java Environment
Object-Oriented Programming in Java
Java Program Structure
Java and Unicode
Summary
Resources
Chapter 2: Programs, Data, Variables, and Calculation
Data and Variables
Integer Data Types
Floating-Point Data Types
Fixing the Value of a Variable
Arithmetic Calculations
The op= Operators
Mathematical Functions and Constants
Storing Characters
Bitwise Operations
Variables with a Fixed Set of Integer Values
Boolean Variables
Operator Precedence
Program Comments
Summary
Chapter 3: Loops and Logic
Making Decisions
Logical Operators
The Conditional Operator
The switch Statement
Variable Scope
Loops
Assertions
Summary
Chapter 4: Arrays and Strings
Arrays
Strings
Operations on Strings
Mutable Strings
Summary
Chapter 5: Defining Classes
What Is a Class?
Defining Classes
Defining Methods
Constructors
Defining and Using a Class
Method Overloading
Using Objects
Recursion
Understanding Packages
Controlling Access to Class Members
Nested Classes
Summary
Chapter 6: Extending Classes and Inheritance
Using Existing Classes
Class Inheritance
The @Override Annotation
Choosing Base Class Access Attributes
Polymorphism
Multiple Levels of Inheritance
Abstract Classes
The Universal Superclass
Methods Accepting a Variable Number of Arguments
Casting Objects
More on Enumerations
Designing Classes
Using the final Modifier
Interfaces
Anonymous Classes
Summary
Chapter 7: Exceptions
The Idea Behind Exceptions
Types of Exceptions
Dealing with Exceptions
Exception Objects
Defining Your Own Exceptions
Summary
Chapter 8: Understanding Streams
Streams and Input/Output Operations
Understanding Streams
The Classes for Input and Output
The Standard Streams
Summary
Chapter 9: Accessing Files and Directories
Accessing the File System
Working with Path Objects
Creating and Deleting Directories and Files
Getting the Contents of a Directory
Closing a Stream
Moving and Copying Files and Directories
Summary
Chapter 10: Writing Files
File I/O Basics
File Output
Writing a File via an Output Stream
Writing a File Using a Writer
Buffers
Writing a File Using a Channel
File Write Operations
Forcing Data to Be Written to a Device
Summary
Chapter 11: Reading Files
File Read Operations
Reading a File Using a Channel
Copying Files
Random Access to a File
Memory-Mapped Files
Summary
Chapter 12: Serializing Objects
Storing Objects in a File
Writing an Object to a File
Reading an Object from a File
Summary
Chapter 13: Generic Class Types
What Are Generic Types?
Defining a Generic Class Type
Generic Types and Generic Interfaces
Variables of a Raw Type
Wildcards as Type Parameter Arguments
Arrays and Parameterized Types
Parameterized Methods
Parameterized Types and Inheritance
Summary
Chapter 14: The Collections Framework
Understanding the Collections Framework
Collections of Objects
Iterators
Collection Classes
Using EnumSet
Array Collection Classes
Linked Lists
Using Maps
Summary
Chapter 15: A Collection of Useful Classes
Utility Methods for Arrays
Observable and Observer Objects
Generating Random Numbers
Dates and Times
Regular Expressions
Using a Scanner
Summary
Chapter 16: Threads
Understanding Threads
Managing Threads
Using Executors
Thread Priorities
Summary
Chapter 17: Creating Windows
Graphical User Interfaces in Java
Creating a Window
Components and Containers
Basics of Components
Using Swing Containers
Container Layout Managers
Adding a Menu to a Window
Summary
Chapter 18: Handling Events
Interactive Java Programs
The Event-Handling Process
Event Classes
Semantic Event Handling in Applets
Semantic Event Listeners in an Application
Using Actions
Adding a Toolbar
Adding Menu Icons
Adding Tooltips
Disabling Actions
Summary
Chapter 19: Drawing in a Window
Using the Model/View Architecture
Component Coordinate Systems
Drawing on a Component
Shapes
Filling Shapes
Managing Shapes
Drawing Using the Mouse
Defining Your Own Shape Classes
Changing the Cursor
Summary
Chapter 20: Extending the GUI
Creating a Status Bar
Using Dialogs
Using a Dialog to Create Text Elements
A Font Selection Dialog
Pop-Up Menus
Transforming the User Coordinate System
Choosing Custom Colors
Summary
Chapter 21: Filing and Printing Documents
Serializing the Sketch
Basic Infrastructure for Saving Sketches
Using a File Chooser
Implementing File Operations
Printing in Java
Summary
Chapter 22: Java and XML
XML
XML Document Structure
Data Structure in XML
Document Type Definitions
Rules for a Well-Formed Document
XML Namespaces
XML Schemas
A Schema for Sketcher
Programming with XML Documents
Accessing Parsers
Using SAX
Summary
Chapter 23: Creating and Modifying XML Documents
The Document Object Model
Setting DOM Parser Features
Parsing a Document
Navigating a Document Object Tree
Transforming XML
Creating Document Objects
Storing a Sketch as XML
Reading an XML Representation of a Sketch
Summary
Appendix A: Keywords
Appendix B: Computer Arithmetic
← Prev
Back
Next →
← Prev
Back
Next →