We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7
Dynamic
The Evolution of Java
A Culture of Innovation Chapter 2 An Overview of Java Object-Oriented Programming Two Paradigms Abstraction The Three OOP Principles A First Simple Program Entering the Program Compiling the Program A Closer Look at the First Sample Program A Second Short Program Two Control Statements The if Statement The for Loop Using Blocks of Code Lexical Issues Whitespace Identifiers Literals Comments Separators The Java Keywords The Java Class Libraries Chapter 3 Data Types, Variables, and Arrays Java Is a Strongly Typed Language The Primitive Types Integers byte short int long Floating-Point Types float double Characters Booleans A Closer Look at Literals Integer Literals Floating-Point Literals Boolean Literals Character Literals String Literals Variables Declaring a Variable Dynamic Initialization The Scope and Lifetime of Variables Type Conversion and Casting Java’s Automatic Conversions Casting Incompatible Types Automatic Type Promotion in Expressions The Type Promotion Rules Arrays One-Dimensional Arrays Multidimensional Arrays Alternative Array Declaration Syntax Introducing Type Inference with Local Variables Some var Restrictions A Few Words About Strings Chapter 4 Operators Arithmetic Operators The Basic Arithmetic Operators The Modulus Operator Arithmetic Compound Assignment Operators Increment and Decrement The Bitwise Operators The Bitwise Logical Operators The Left Shift The Right Shift The Unsigned Right Shift Bitwise Operator Compound Assignments Relational Operators Boolean Logical Operators Short-Circuit Logical Operators The Assignment Operator The ? Operator Operator Precedence Using Parentheses Chapter 5 Control Statements Java’s Selection Statements if switch Iteration Statements while do-while for The For-Each Version of the for Loop Local Variable Type Inference in a for Loop Nested Loops Jump Statements Using break Using continue Chapter 6 Introducing Classes Class Fundamentals The General Form of a Class A Simple Class Declaring Objects A Closer Look at new Assigning Object Reference Variables Introducing Methods Adding a Method to the Box Class Returning a Value Adding a Method That Takes Parameters Constructors Parameterized Constructors The this Keyword Instance Variable Hiding Garbage Collection A Stack Class Chapter 7 A Closer Look at Methods and Classes Overloading Methods Overloading Constructors Using Objects as Parameters A Closer Look at Argument Passing Returning Objects Recursion Introducing Access Control Understanding static Introducing final Arrays Revisited Introducing Nested and Inner Classes Exploring the String Class Using Command-Line Arguments Varargs: Variable-Length Arguments Overloading Vararg Methods Varargs and Ambiguity Local Variable Type Inference with Reference Types Chapter 8 Inheritance Inheritance Basics Member Access and Inheritance A More Practical Example A Superclass Variable Can Reference a Subclass Object Using super Using super to Call Superclass Constructors A Second Use for super Creating a Multilevel Hierarchy When Constructors Are Executed Method Overriding Dynamic Method Dispatch Why Overridden Methods? Applying Method Overriding Using Abstract Classes Using final with Inheritance Using final to Prevent Overriding Using final to Prevent Inheritance Local Variable Type Inference and Inheritance The Object Class Chapter 9 Packages and Interfaces Packages Defining a Package Finding Packages and CLASSPATH A Short Package Example Packages and Member Access An Access Example Importing Packages Interfaces Defining an Interface Implementing Interfaces Nested Interfaces Applying Interfaces Variables in Interfaces Interfaces Can Be Extended Default Interface Methods Default Method Fundamentals A More Practical Example Multiple Inheritance Issues Use static Methods in an Interface Private Interface Methods Final Thoughts on Packages and Interfaces Chapter 10 Exception Handling Exception-Handling Fundamentals Exception Types Uncaught Exceptions Using try and catch Displaying a Description of an Exception Multiple catch Clauses Nested try Statements throw throws finally Java’s Built-in Exceptions Creating Your Own Exception Subclasses Chained Exceptions Three Additional Exception Features Using Exceptions Chapter 11 Multithreaded Programming The Java Thread Model Thread Priorities Synchronization Messaging The Thread Class and the Runnable Interface The Main Thread Creating a Thread Implementing Runnable Extending Thread Choosing an Approach Creating Multiple Threads Using isAlive( ) and join( ) Thread Priorities Synchronization Using Synchronized Methods The synchronized Statement Interthread Communication Deadlock Suspending, Resuming, and Stopping Threads Obtaining a Thread’s State Using a Factory Method to Create and Start a Thread Using Multithreading Chapter 12 Enumerations, Autoboxing, and Annotations Enumerations Enumeration Fundamentals The values( ) and valueOf( ) Methods Java Enumerations Are Class Types Enumerations Inherit Enum Another Enumeration Example Type Wrappers