Professional Documents
Culture Documents
3
In this chapter you will learn:
What classes, objects, methods and instance variables are.
How to declare a class and use it to create an object.
How to declare methods in a class to implement the classs behaviors.
How to declare instance variables in a class to implement the classs attributes.
How to call an objects method to make that method perform its task.
The differences between instance variables of a class and local variables of a method.
How to use a constructor to ensure that an objects data is initialized when the object is created.
The differences between primitive and reference types.
3.1 Introduction
3.2 Classes, Objects, Methods and Instance Variables
3.3 Declaring a Class with a Method and Instantiating an Object of a Class
3.4 Declaring a Method with a Parameter
3.5 Instance Variables, set Methods and get Methods
3.6 Primitive Types vs. Reference Types
3.7 Initializing Objects with Constructors
3.8 Floating-Point Numbers and Type double
Introduction
4.2 Algorithms
4.3 Pseudocode
4.4 Control Structures
4.5 if Single-Selection Statement
4.6 ifelse Double-Selection Statement
4.7 while Repetition Statement
4.8 Formulating Algorithms: Counter-Controlled Repetition
4.9 Formulating Algorithms: Sentinel-Controlled Repetition
4.10 Formulating Algorithms: Nested Control Statements
4.11 Compound Assignment Operators
4.12 Increment and Decrement Operators
4.13 Primitive Types
05 Control Statements: Part 2
In this chapter you will learn:
The essentials of counter-controlled repetition.
To use the for and dowhile repetition statements to execute statements in a program
repeatedly.
To understand multiple selection using the switch selection statement.
To use the break and continue program control statements to alter the flow of control.
To use the logical operators to form complex conditional expressions in control statements.
07 Arrays
What arrays are.
To use arrays to store data in and retrieve data from lists and tables of values.
To declare an array, initialize an array and refer to individual elements of an array.
To use the enhanced for statement to iterate through arrays.
To pass arrays to methods.
To declare and manipulate multidimensional arrays.
To write methods that use variable-length argument lists.
To read command-line arguments into a program.
7.2 Arrays
7.3 Declaring and Creating Arrays
7.4 Examples Using Arrays
7.5 Case Study: Card Shuffling and Dealing Simulation
7.6 Enhanced for Statement
7.7 Passing Arrays to Methods
7.8 Case Study: Class GradeBook Using an Array to Store Grades
7.9 Multidimensional Arrays
7.10 Case Study: Class GradeBook Using a Two-Dimensional Array
7.11 Variable-Length Argument Lists
7.12 Using Command-Line Arguments
8 Classes and Objects: A Deeper Look
In this chapter you will learn:
Encapsulation and data hiding.
The notions of Data Abstraction and Abstract Data Types (ADTs).
To use keyword THIS.
To use STATIC variables and methods.
To import static members of a class.
To use the ENUM type to create sets of constants with unique identifiers.
How to declare enum constants with parameters.
Java Tutorial: What is Java open link History of Java Features of Java C++ vs Java Hello Java Program
Program Internal How to set path? JDK, JRE and JVM Internal Details of JVM Variable and Data Type
Unicode System, Operators
Control Statements: Java If-else Java SwitchJava For LoopJava While LoopJava Do While LoopJava Break
Java Continue Java Comments Java Programs