Java programming

Develop, Compile, and Debug High-Performance Java Applications Take your Java skills to the next level using the expert programming techniques contained in this Oracle Press guide. Featuring real-world code samples and detailed instructions, Java Programming demonstrates how to fully utilize the pow...

Descripción completa

Detalles Bibliográficos
Otros Autores: Sarang, P. G Author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: [Place of publication not identified] McGraw Hill Professional 2011
Edición:1st edition
Colección:Oracle Press
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629408306719
Tabla de Contenidos:
  • Cover
  • Java™ Programming
  • About the Author
  • Contents at a Glance
  • Contents
  • Foreword
  • Acknowledgments
  • Introduction
  • Chapter 1: Introduction to Java
  • Why Java?
  • So What Is Java?
  • Java Virtual Machine
  • Features of Java
  • Small
  • Simple
  • Object Oriented
  • Compiled and Interpreted
  • Platform Independent
  • Robust and Secure
  • Multithreaded
  • Dynamic
  • Java's Evolution
  • JDK 1.0 (January 23, 1996): Codename Oak
  • JDK 1.1 (February 19, 1997)
  • Java Beans
  • Remote Method Invocation
  • The JAR File Format
  • Digital Signatures
  • AWT Enhancements
  • Other Changes
  • J2SE 1.2 (December 8, 1998): Codename Playground
  • The Introduction of Swing
  • The 2D API
  • Drag-and-Drop
  • Audio Enhancements
  • Java IDL
  • Security Enhancements
  • Other Enhancements
  • J2SE 1.3 (May 8, 2000): Codename Kestrel
  • J2SE 1.4 (Feb 6, 2002): Codename Merlin
  • J2SE 5.0 (Sept 30, 2004): Codename Tiger
  • Java SE 6 (Dec 11, 2006): Codename Mustang
  • Java SE 7 (July 7, 2011): Codename Dolphin
  • Summary
  • Chapter 2: Arrays
  • Arrays
  • Declaring Arrays
  • Creating Arrays
  • Accessing and Modifying Array Elements
  • Initializing Arrays
  • Initializing at Runtime
  • Initializing Using Array Literals
  • The for-each Loop
  • Multidimensional Arrays
  • Two-dimensional Arrays
  • Initializing Two-dimensional Arrays
  • Initializing at Runtime
  • Initializing Using Array Literals
  • Looping Using the for-each Construct
  • N-dimensional Arrays
  • Nonrectangular Arrays
  • Runtime Initialization
  • Initialization Using Array Literals
  • A Few Goodies
  • Determining the Array Length
  • Cloning an Array
  • Finding Out the Class of an Array
  • Summary
  • Chapter 3: Classes
  • Object-Oriented Programming (OOP) Concepts
  • OOP Features
  • Encapsulation
  • Inheritance
  • Polymorphism
  • OOP Benefits
  • The Class
  • Defining a Class.
  • Declaring a Point Class
  • Using Classes
  • Accessing/Modifying Fields
  • The Class Example Program
  • Declaring Methods
  • Memory Representation of Objects
  • Information Hiding
  • Encapsulation
  • Declaring Constructors
  • Default Constructor
  • Rules for Defining a Constructor
  • Source File Layout
  • The package Statement
  • The import Statement
  • Directory Layout and Packages
  • Summary
  • Chapter 4: Inheritance
  • Why Inheritance?
  • What Is Inheritance?
  • Defining Single-level Inheritance
  • Capturing Multilevel Inheritance
  • Writing a Multilevel Inheritance Program
  • Polymorphism
  • Creating a Heterogeneous Collection of Objects
  • A Program That Demonstrates a Heterogeneous Collection
  • Detecting the Object Type
  • Typecasting Rules on Inheritance Hierarchies
  • Preventing Method Overriding
  • Preventing Subclassing
  • Summary
  • Chapter 5: Object Creation and Member Visibility
  • Instantiating a Subclass
  • The Object-Creation Process
  • Calling the super Constructor
  • Method Overloading
  • Rules of Method Overloading
  • Creating a Copy Constructor
  • Invoking Constructors: Summary
  • The final Keyword
  • The final Classes
  • The final Methods
  • The final Variables
  • The final Variables of the Class Type
  • Important Points Related to the final Keyword
  • Understanding Member Visibility Rules
  • The public Modifier
  • The private Modifier
  • The protected Modifier
  • The Default Modifier
  • A Few Rules on Inheriting
  • Summary
  • Chapter 6: Static Modifier and Interfaces
  • The static Keyword
  • The Static Fields
  • Accessing Static Fields Through Object References
  • Inheriting Static Fields
  • Creating a Truly Global Variable
  • Creating Application Constants
  • Some Important Notes on Static Fields
  • The Static Methods
  • Access Restrictions in Static Methods
  • Some Important Notes on Static Methods
  • The Static Initializers.
  • Advantages of a Static Initializer
  • Multiple Static Blocks
  • An Alternative to a Static Initializer
  • Some Important Notes on Static Initializers
  • Interfaces
  • A Real-life Example of an Interface
  • Understanding Interface Syntax
  • Understanding Interfaces Through an Example
  • Extending Interfaces
  • Implementing Multiple Interfaces
  • Combining Interfaces
  • A Few Important Points on Interfaces
  • Abstract Classes
  • Summary
  • Chapter 7: Nested Classes
  • Nested Classes
  • Why Use Nested Classes?
  • Classifications of Nested Classes
  • Demonstrating the Use of Inner Classes
  • Accessing an Inner Class from the Outside
  • Accessing Shadowed Variables
  • Important Points to Note
  • Member Classes
  • Local Classes
  • Defining an Inner Class within Method Scope
  • A Few Important Points on Local Classes
  • Anonymous Classes
  • Creating Anonymous Classes
  • Restrictions on the Use of Anonymous Classes
  • Compiled Anonymous Classes
  • Guidelines on Using Anonymous Classes
  • Summary
  • Chapter 8: Exception Handling
  • What Is an Exception?
  • Error Types
  • The Non-fatal Errors
  • The try-catch Statements
  • Classifying Exceptions
  • Combining Exception Handlers
  • How Runtime Matches catch Blocks
  • The finally Statement
  • Guidelines on the Use of the finally Block
  • Rules for Using the try/catch/finally Block
  • The try-with-resources Statement
  • Checked/Unchecked Exceptions
  • The throws Construct
  • Throwing Multiple Exceptions
  • User-defined Exceptions
  • The throw Statement
  • Re-throwing Exceptions
  • Difference Between the throw and throws Keywords
  • The final Re-throw in Java SE 7
  • Declaring Exceptions in Overridden Methods
  • Printing a Stack Trace
  • Asynchronous Exceptions
  • Guidelines for Using Exceptions
  • Summary
  • Chapter 9: Java I/O
  • Input/Output Streams
  • The I/O Class Hierarchy
  • The Byte Streams.
  • Determining File Length
  • The InputStream Methods
  • The OutputStream Class
  • File Copy Utility
  • The OutputStream Methods
  • Character Streams
  • File Viewer Utility
  • Buffered Readers/Writers
  • The BufferedReader Class
  • The BufferedWriter Class
  • Binary Versus Character Streams
  • Chaining Streams
  • The Line Count Program
  • File Concatenation
  • Accessing the Host File System
  • The Directory Listing Program
  • Filtering the Directory Listing
  • Reading/Writing Objects
  • Summary
  • Chapter 10: Advanced I/O
  • The Byte-Oriented Stream Classes
  • The PushbackInputStream Class
  • The SequenceInputStream Class
  • The PrintStream Class
  • The Character-Oriented Stream Classes
  • The CharArray Reader/Writer Classes
  • The Console Class
  • The StreamTokenizer Class
  • The Object-Oriented Streams
  • The Externalizable Interface
  • Nested Objects Serialization
  • Versioning Objects
  • Summary
  • Chapter 11: Enums, Autoboxing, and Annotations
  • Typesafe Enumerations
  • Creating Integer Patterns for Enumerations
  • The enum Type
  • Listing Enumeration Constants
  • Adding Properties to an Enumeration
  • The ordinal and compareTo Methods
  • Attaching Methods to Enumerations
  • Serializing enum Types
  • Autoboxing
  • Wrapper Classes
  • A Few Additions in J2SE 5.0
  • Additional Functionality
  • Extended Support for Unicode Code Point
  • The Void Wrapper
  • Autoboxing/Unboxing
  • Annotations
  • Built-in Annotations
  • The @Override Annotation
  • The @SuppressWarnings Annotation
  • Declaring Annotations
  • Marker Annotations
  • Multivalue Annotations
  • Custom Annotation Program
  • Rules for Defining Annotation Types
  • Annotating an Annotation
  • The Target Annotation
  • The Retention Annotation
  • Annotations at Runtime
  • The Documented Annotation
  • The Inherited Annotation
  • Summary
  • Chapter 12: Generics
  • Generics
  • What Are Generics?.
  • Why Do We Need Generics?
  • A Sample Generics Program
  • Type Safety
  • Creating a Parameterized Stack Type
  • Declaration Syntax
  • A Generic Stack Class
  • Examining Intermediate Code
  • Testing the Stack Class
  • Bounded Types
  • Using Wildcards
  • Bounded Wildcards
  • Raw Types
  • More on Generic Types
  • Class with Two Generic Parameters
  • Casting Types
  • Comparing and Assigning Generic Types
  • Generic Methods
  • Declaring Generic Interfaces
  • Restrictions in Generics
  • Creating Arrays
  • Instantiating Type Parameters
  • Use of the static Keyword
  • Summary
  • Chapter 13: Event Processing and GUI Building
  • Event Processing Model
  • Delegation Event Model
  • The Event Source
  • The Event Listener
  • Event Processing Sequence
  • Registering on Multiple Event Sources
  • Multiple Event Types
  • Building a GUI
  • Creating the User Interface
  • Demonstrating the Button Control
  • Demonstrating the Edit Control
  • Demonstrating the List Box Control
  • Summary
  • Chapter 14: Creating Layouts
  • Layout Managers
  • Types of Layout Managers
  • Building the GUI
  • How Do Layout Managers Work?
  • Using Layout Managers
  • BorderLayout
  • Using NetBeans to Build the GUI
  • FlowLayout
  • CardLayout
  • GridLayout
  • GridBagLayout
  • BoxLayout
  • Tabbed Dialog Box
  • Advanced Layout Managers
  • Summary
  • Chapter 15: Graphics and User Gestures Processing
  • What Is an Applet?
  • Creating Your First Applet
  • Running the Applet
  • Using AppletViewer
  • Understanding Applet Life-cycle Methods
  • Processing Mouse Events
  • Mouse Clicks
  • Mouse Motion Events
  • Creating Popup Menus
  • Customizing the Drawing Color
  • Processing Keyboard Events
  • Summary
  • Chapter 16: Collections
  • What Is the Java Collections Framework?
  • Benefits of the Collections Framework
  • What the Collections Framework Offers
  • The Collections Framework Interfaces.
  • The Collections Framework Classes.