Java Programming
Java Programming is an introductory level text that instils an understanding of basic concepts before gradually moving to advanced topics like swing, socket programming, JAVA native interface, remote method invocation and serialization. Programs are accompanied by complete explanations, and their ou...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Noida :
Pearson India
2012.
|
Colección: | Always learning.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009820413406719 |
Tabla de Contenidos:
- Cover
- Brief Contents
- Contents
- Preface
- Acknowledgements
- Chapter 1: Introduction to OOPs
- 1.1 Structured Introduction
- 1.1.1 Sequence Structure
- 1.1.2 Loop or Iteration Structure
- 1.1.3 Decision Structure
- 1.2 Procedural Programming
- 1.3 Programming Methodology
- 1.4 Object-oriented Programming
- 1.5 Basic Concepts of OOPs
- 1.6 Characteristics of OOPs
- 1.7 Advantages of OOPs
- 1.8 Object-oriented Languages
- 1.9 Object-based Languages
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 2: Marching Towards Java and Java Bytecodes
- 2.1 Introduction: What is Java?
- 2.2 Evolution of Java
- 2.3 Main Benefits of Using Java
- 2.4 Key Features of Java
- 2.5 Java Character Set
- 2.5.1 Java Tokens
- 2.6 Variables
- 2.7 How to Put Comments in Java?
- 2.8 Data Types in Java
- 2.9 Structure of a Java Program
- 2.10 Your First Program in Java
- 2.10.1 Compiling and Running the Program (DOS Based)
- 2.11 Java is Free Form
- 2.12 Programming Examples
- 2.13 Reading Using Scanner
- 2.14 Command Line Arguments
- 2.15 Using Constants
- 2.16 Bytecode and JVM
- 2.16.1 What is the Java Virtual Machine? Why is it Here?
- 2.16.2 What are Java Bytecodes?
- 2.16.3 Virtual Parts
- 2.16.4 The Proud, the Few, the Registers
- 2.16.5 The Method Area and the Program Counter
- 2.16.6 The Java Stacks and Related Registers
- 2.16.8 What is in a Class File?
- 2.17 Why Understand Bytecode?
- 2.17.1 How to Get Bytecode ?
- 2.17.2 Implementation of Bytecode Works
- 2.18 The Java Platform
- 2.19 Java, Internet and WWW
- 2.20 JDK TooLS
- 2.21 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 3: Introduction to Operators and Expression in Java
- 3.1 Introduction
- 3.1.1 Binary Operators
- 3.1.2 Unary Operators.
- 3.1.3 Expressions
- 3.2 Arithmetic Operators
- 3.3 Relation and Ternary Operator
- 3.4 Logical Operator
- 3.4.1 Logical AND (&&)
- 3.4.2 Logical OR
- 3.4.3 Logical NOT (!)
- 3.5 Assignment Operator
- 3.6 Increment (++) and Decrement (--) Operator
- 3.7 Bitwise Operators
- 3.7.1 Bitwise AND (&)
- 3.7.2 Bitwise OR (|)
- 3.7.3 Bitwise XOR (^)
- 3.7.4 1's Complement (~)
- 3.7.5 Left Shift Operator (>)
- 3.7.7 Right Shift with Zero Fill (>>>)
- 3.8 The Instance of Operator
- 3.9 The Comma Operator
- 3.10 The size of () Operator
- 3.11 Precedence of Operator
- 3.12 Type Conversion and Typecasting
- 3.13 Mathematical Functions
- 3.14 Scope and Lifetime
- 3.15 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 4: Working with Decision-making Statement in Java
- 4.1 Introduction
- 4.2 The if Statement
- 4.3 The if-else Statement
- 4.4 Nesting of if-else Statement
- 4.5 else-if Ladder
- 4.6 Switch-Case Statement
- 4.7 Introduction of Loops
- 4.7.1 The while Loop
- 4.7.2 The for Loop
- 4.8 Different Syntaxes of for Loop
- 4.9 Programming Examples
- 4.9.1 Nesting of for Loop
- 4.9.2 The do-while Statement
- 4.10 break and continue Statement
- 4.10.1 The break Statement
- 4.10.2 The continue Statement
- 4.10.3 Labelled break and continue Statement
- 4.11 Ponderabale Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 5: Working with Array in Java
- 5.1 Introduction
- 5.2 Creating Arrays in Java
- 5.3 Some Important Points About Array
- 5.4 Initializing 1-D Array
- 5.5 Programming Examples (Part-1)
- 5.6 Two-dimensional (2-D) Array
- 5.7 Three-dimensional (3-D) and Variable Column Length Arrays
- 5.7.1 3-D Array
- 5.8 Ponderable Points
- Review Questions.
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 6: Functions in Java
- 6.1 Introduction
- 6.2 Function Declaration and Definition
- 6.3 No Return Type but Arguments
- 6.3.1 Returning Prematurely from Function
- 6.4 Function with Parameters and Return Type
- 6.5 Recursion
- 6.6 Function Overloading
- 6.7 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 7: Classes and Objects
- 7.1 Introduction
- 7.2 Programming Examples
- 7.3 Accessing Private Data
- 7.4 Passing and Returning Objects
- 7.5 Copying Objects
- 7.6 Array of Objects
- 7.7 Static Class Members
- 7.7.1 Static Member Functions
- 7.7.2 Static Data Members
- 7.8 Constructors
- 7.8.1 Constructors with Parameters
- 7.9 Copy Constructor
- 7.10 The this Reference
- 7.11 Garbage Collection and Finalize Method
- 7.12 The Final Keyword Revisited
- 7.12.1 Blank Finals
- 7.12.2 Final Arguments to Methods
- 7.13 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 8: Inheritance in Java
- 8.1 Introduction
- 8.2 Types of Inheritance
- 8.2.1 Single-level Inheritance
- 8.2.2 Multilevel Inheritance
- 8.2.3 Multiple Inheritance
- 8.2.4 Hierarchical Inheritance
- 8.2.5 Hybrid Inheritance
- 8.3 Programming Examples
- 8.4 Method Overriding
- 8.5 Dynamic Method Dispatch
- 8.6 Hierarchical Inheritance Revisited
- 8.7 The Super Keyword
- 8.8 Constructor and Inheritance
- 8.9 Object Slicing
- 8.10 Final Class
- 8.11 Abstract Class
- 8.12 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 9: Packages and Interfaces
- 9.1 Introduction
- 9.2 Package Types
- 9.2.1 Built-in Packages
- 9.2.2 User-defined Packages
- 9.3 Interface
- 9.3.1 Interface Declaration.
- 9.3.2 Interface Implementation
- 9.3.3 Programming Examples
- 9.3.4 Extending Classes and Interfaces
- 9.4 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 10: String and String Buffer
- 10.1 The String Class
- 10.2 Constructors for String Class
- 10.3 Methods of String Class
- 10.4 Programming Examples (Part 1)
- 10.5 The StringBuffer Class
- 10.6 Constructor of StringBuffer Class
- 10.7 Methods of StringBuffer Class
- 10.8 Programming Examples (Part 2)
- 10.9 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 11: Exception Handling
- 11.1 Introduction
- 11.2 What is Exception?
- 11.3 Basis for Exception Handling
- 11.4 Exception-Handling Mechanism
- 11.5 Exception Classes in Java
- 11.5.1 Runtime Exception
- 11.5.2 Checked versus Unchecked Exception
- 11.6 Without Try-Catch
- 11.7 Exception Handling Using Try and Catch
- 11.8 Creating Your Own Exception
- 11.9 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 12: Threads in Java
- 12.1 Introduction
- 12.2 Creating Threads
- 12.2.1 Extending Thread Class
- 12.2.2 Thread Methods
- 12.2.3 Implementing Thread Using Runnable
- 12.3 Thread Priority
- 12.4 Thread Synchronization
- 12.4.1 The Synchronized Method
- 12.4.2 The Synchronized Statement
- 12.5 Thread Communication
- 12.6 Suspended and Resuming Threads
- 12.7 Daemon Threads
- 12.8 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 13: Streams and Files
- 13.1 Introduction
- 13.2 Working with Files
- 13.2.1 Method of File Class
- 13.3 Types of Streams
- 13.3.1 Character Streams
- 13.3.2 Programming Examples
- 13.3.3 Byte Stream.
- 13.4 Reading from Console
- 13.5 Writing to Console
- 13.6 Reading and Writing Files
- 13.7 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 14: Applet and Graphics Programming
- 14.1 Introduction
- 14.2 Applet versus Application Programs
- 14.3 The Applet Class
- 14.4 Writing the First Applet
- 14.5 Life Cycle of an Applet
- 14.6 Applet Tag and Applet Parameters
- 14.7 Passing Parameter to Applet
- 14.8 The Paint, Update and Repaint Method
- 14.8.1 The Paint Method
- 14.8.2 The Update Method
- 14.8.3 The Repaint Method
- 14.9 Get Document Base() and Get Code Base() Methods
- 14.10 The AppletContext Interface
- 14.11 Playing Audio in Applet
- 14.11. 1 Playing Audio Using Play Method of Applet Class
- 14.11.2 Playing Audio Using AudioClip Interface
- 14.12 Working with Graphics Class
- 14.12.1 Drawing Lines and Rectangles
- 14.12.2 Drawing Ovals and Circles
- 14.12.3 Drawing Polygon
- 14.12.4 Using Color
- 14.12.5 Setting the Drawing Mode
- 14.12.6 Programming Example
- 14.13 Working with Fonts
- 14.14 The FontMetrics Class
- 14.15 Ponderable Points
- Review Questions
- Multiple Choice Questions
- Key for Multiple Choice Questions
- Chapter 15: Event Handling
- 15.1 Introduction
- 15.2 The Delegation Event Model
- 15.3 The Event Classes
- 15.4 Event Listeners
- 15.5 Event Sources
- 15.6 Discussion of Event Classes
- 15.7 The Listeners Interfaces
- 15.8 Programming Example
- 15.8. 1 Handling Mouse Events
- 15.8.2 Handling Keyboard Events
- 15.9 Adapter Classes
- 15.10 Nested and Inner Classes
- 15.10.1 Inner Classes in Methods and Scopes
- 15.10.2 Static Nested Class
- 15.10.3 Inner Classes in Event Handling
- 15.10.4 Anonymouse Inner Class
- 15.11 Ponderable Points
- Review Questions
- Multiple Choice Questions.
- Key for Multiple Choice Questions.