Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Getting Started with Java
What Is Java?
Java Is a Language
Java Is a Platform
Installing and Working with JDK 7
Installing JDK 7
Working with JDK 7
Installing and Working with NetBeans 7
Installing NetBeans 7
Working with NetBeans 7
Java Language Fundamentals
Comments
Identifiers
Types
Variables
Expressions
Statements
Summary
Chapter 2: Discovering Classes and Objects
Declaring Classes and Creating Objects
Declaring Classes
Creating Objects with the new Operator and a Constructor
Specifying Constructor Parameters and Local Variables
Creating Arrays with the new Operator
Encapsulating State and Behaviors
Representing State via Fields
Representing Behaviors via Methods
Hiding Information
Initializing Classes and Objects
Inheriting State and Behaviors
Extending Classes
The Ultimate Superclass
Composition
The Trouble with Implementation Inheritance
Changing Form
Upcasting and Late Binding
Abstract Classes and Abstract Methods
Downcasting and Runtime Type Identification
Covariant Return Types
Formalizing Class Interfaces
Declaring Interfaces
Implementing Interfaces
Extending Interfaces
Why Use Interfaces?
Collecting Garbage
Summary
Chapter 3: Exploring Advanced Language Features
Nested Types
Static Member Classes
Nonstatic Member Classes
Anonymous Classes
Local Classes
Interfaces Within Classes
Packages
What Are Packages?
The Package Statement
The Import Statement
Searching for Packages and Types
Playing with Packages
Packages and JAR Files
Static Imports
Exceptions
What Are Exceptions?
Representing Exceptions in Source Code
Throwing Exceptions
Handling Exceptions
Performing Cleanup
Assertions
Declaring Assertions
Using Assertions
Avoiding Assertions
Enabling and Disabling Assertions
Annotations
Discovering Annotations
Declaring Annotation Types and Annotating Source Code
Processing Annotations
Generics
Collections and the need for Type Safety
Generic Types
Generic Methods
Arrays and Generics
Varargs and Generics
Enums
The Trouble with Traditional Enumerated Types
The Enum Alternative
The Enum Class
Summary
Chapter 4: Touring Language APIs
Math and StrictMath
Package
Primitive Type Wrapper Class
Boolean
Character
Float and Double
Integer, Long, Short, and Byte
Number
Reference
Basic Terminology
Reference and ReferenceQueue
SoftReference
WeakReference
PhantomReference
Reflection
String
StringBuffer and StringBuilder
System
Threading
Runnable and Thread
Thread Synchronization
BigDecimal
BigInteger
Summary
Chapter 5: Collecting Objects
The Collections Framework
Architecture Overview
Iterable and Collection
List
Set
SortedSet
NavigableSet
Queue
Deque
Map
SortedMap
NavigableMap
Utilities
Legacy Collections APIs
Creating Your Own Collections
Summary
Chapter 6: Touring Additional Utility APIs
Concurrency Utilities
Executors
Synchronizers
Concurrent Collections
Locks
Atomic Variables
Additional Concurrency Utilities
Objects
Random
Summary
Chapter 7: Creating and Enriching Graphical User Interfaces
Abstract Window Toolkit
Toolkits
Components, Containers, Layout Managers, and Events
Images
Data Transfer
Swing
An Extended Architecture
Sampling Swing Components
Java 2D
GraphicsEnvironment, GraphicsDevice, and GraphicsConfiguration
Graphics2D
Shapes
Buffered Images
Summary
Chapter 8: Interacting with Filesystems
File
RandomAccessFile
Streams
Stream Classes Overview
OutputStream and InputStream
FileOutputStream and FileInputStream
FilterOutputStream and FilterInputStream
BufferedOutputStream and BufferedInputStream
DataOutputStream and DataInputStream
Object Serialization and Deserialization
PrintStream
Writers and Readers
Writer and Reader Classes Overview
Writer and Reader
OutputStreamWriter and InputStreamReader
FileWriter and FileReader
Summary
Chapter 9: Interacting with Networks and Databases
Interacting with Networks
Communicating via Sockets
Communicating via URLs
Authentication
Cookie Management
Interacting with Databases
Java DB
JDBC
Summary
Chapter 10: Parsing, Creating, and Transforming XML Documents
What Is XML?
XML Declaration
Elements and Attributes
Character References and CDATA Sections
Namespaces
Comments and Processing Instructions
Well-Formed Documents
Valid Documents
Parsing XML Documents with SAX
Exploring the SAX API
Demonstrating the SAX API
Creating a Custom Entity Resolver
Parsing and Creating XML Documents with DOM
A Tree of Nodes
Exploring the DOM API
Parsing and Creating XML Documents with StAX
Parsing XML Documents
Creating XML Documents
Selecting XML Document Nodes with XPath
XPath Language Primer
XPath and DOM
Advanced XPath
Transforming XML Documents with XSLT
Exploring the XSLT API
Demonstrating the XSLT API
Summary
Chapter 11: Working with Web Services
What Are Web Services?
SOAP-Based Web Services
RESTful Web Services
Java and Web Services
Web Service APIs
Web Service Annotations
Web Service Tools
Lightweight HTTP Server
Working with SOAP-Based Web Services
Creating and Accessing a Temperature-Conversion Web Service
Accessing the Image Cutout Web Service
Working with RESTful Web Services
Creating and Accessing a Library Web Service
Accessing Google's Charts Web Service
Advanced Web Service Topics
Working with SAAJ
Logging SOAP Messages with a JAX-WS Handler
Authentication and a Customized Lightweight HTTP Server
RESTful Web Services and Attachments
Providers and Dispatch Clients
Summary
Chapter 12: Java 7 Meets Android
Exploring Android and Android App Architectures
Android Architecture
App Architecture
Installing the Android SDK and an Android Platform
Accessing System Requirements
Installing the Android SDK
Installing an Android Platform
Creating and Starting an AVD
Creating an AVD
Starting the AVD
Creating, Installing, and Running an App
Introducing Java7MeetsAndroid
Creating Java7MeetsAndroid
Installing and Running Java7MeetsAndroid
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →