Log In
0% completed
All Lessons
Free Lessons (2)
A First Look at Java
Introduction: A First Look at Java
The Programming Language Java
A Simple Java Program
Comments
Data Types
Variables
Constants
Simple Input from the Keyboard
A Problem Solved: Apples by the Box
Writing, Compiling, and Running a Java Program
Summary: A First Look at Java
Practice Challenges for Fun
Arithmetic Expressions
Introduction: Arithmetic Expressions
Arithmetic Operators
Conversions between Numeric Data Types
A Problem Partially Solved: Day of the Week
Standard Mathematical Methods
A Problem Solved: Wind Chill
Summary: Arithmetic Expressions
Practice Challenges for Fun
Debugging Interlude—The Errors Programmers Make
Introduction: Debugging Interlude—the Errors Programmers Make
Kinds of Errors
Compile-Time Errors
More Compile-Time Errors
Execution-Time Errors
Summary: Debugging Interlude—the Errors Programmers Make
Practice Challenges for Fun
Using Classes and Objects
Introduction: Using Classes and Objects
Terminology: Classes and Objects
The Class String
Methods of the Class String
Strings and the Class Scanner
A Problem Solved: Processing a String
The Class LocalTime
The Class BigDecimal
Wrapper Classes
The Class Random
The Class DecimalFormat
Summary: Using Classes and Objects
Practice Challenges for Fun
Class Definitions—The Fundamentals
Introduction: Class Definitions—the Fundamentals
Using a Class
Beginning a Class Definition
Defining Constructors
Defining a Class’s Methods
Local Variables
Designing a New Class
Implementing a New Class
Passing Arguments
A Problem Solved: Comparing Classes of Squares
Summary: Class Definitions—the Fundamentals
Practice Challenges for Fun
Debugging Interlude—Common Mistakes with Classes
Introduction: Debugging Interlude—Common Mistakes with Classes
A Silent Computational Error
Undefined Variables of a Class Type
Constructors
Omitting the Method toString
A Problem Solved: Extracting Strings
Summary: Debugging Interlude—Common Mistakes with Classes
Practice Challenges for Fun
Decisions
Introduction: Decisions
The if Statement
Basic Comparisons
A Problem Solved: Day of the Week
The if-else Statement
More Boolean Expressions in Comparisons
A Problem Solved: Leap Years
Assertions
Summary: Decisions
Practice Challenges for Fun
Class Definitions—More Details
Introduction: Class Definitions—More Details
Boolean-Valued Methods
Private Methods
Final Fields and Static Fields
Enumerations
A Problem Solved: Representing Coins
Completing the Definition of the Class Coin
Calling a Constructor from a Constructor
Summary: Class Definitions—More Details
Practice Challenges for Fun
Multiway Decisions
Introduction: Multiway Decisions
Nested if Statements
More Examples of Multiway if Statements
A Problem Solved: Health Club Welcome
The switch Statement
More Examples of the switch Statement
A Problem Solved: Designing a Class of Temperatures
A Problem Solved: Defining the Class Temperature
Summary: Multiway Decisions
Practice Challenges for Fun
Debugging Interlude—Avoiding Mistakes; Finding Mistakes
Introduction: Debugging Interlude—Avoiding/Finding Mistakes
Avoiding Mistakes
Debugging a Program in Development
An Introduction to Testing
Refining a Problem’s Solution
Summary: Debugging Interlude—Avoiding/Finding Mistakes
Repetition
Introduction: Repetition
The Logic of a Loop
The while Statement
More Examples
A Problem Solved: A Guessing Game
Mistakes in Loops
Boolean Variables in Loops
Nested Loops
The Scope of a Variable
A Problem Solved: The Root of an Equation
Summary: Repetition
Practice Challenges for Fun
Repetition Continued
Introduction: Repetition Continued
The for Statement
More Examples
Using an Enumeration with a for Statement
The do Statement
Summary: Repetition Continued
Practice Challenges for Fun
Debugging Interlude—Debugging Loops
Introduction: Debugging Interlude—Debugging Loops
Testing
Tracing
An Example: String Processing
Overview of Debugging Tools
Summary: Debugging Interlude—Debugging Loops
Arrays
Introduction: Arrays
Motivation
Array Basics
More Array Basics
A Problem Solved—Computing Deviations
Partially Filled Arrays
Counting Occurrences in an Array
Locating the Smallest Entry in an Array
Searching an Array for a Given Entry
Arrays of Objects
Arrays as Arguments or Return Values in a Method
Array Assignments
Copying an Array
Array Equality
Summary: Arrays
Practice Challenges for Fun
Copying an ArrayProofer version
An Array-Based Data Structure
Introduction: An Array-Based Data Structure
The Data Collection Bag
Specifying a Bag
Identifying a Group of Core Methods
Defining the Data Fields, Constructors, and Core Methods
The Class BagOfStrings So Far
Implementing More Methods
Methods That Remove Strings
The Methods getIndexOf and contains
Testing the Methods That Remove Strings
Testing the Completed Class BagOfStrings
Summary: An Array-Based Data Structure
Practice Challenges for Fun
Debugging Interlude—Debugging Arrays
Introduction: Debugging Interlude—Debugging Arrays
An Unallocated Array
A Silent Error
Array Index Out of Bounds
Summary: Debugging Interlude—Debugging Arrays
Glossary
Glossary of Terms
Appendixes
Introduction to Computing
Reserved Words
Unicode Characters
Documentation and Programming Style
Java Programming After this Course
Getting Java for Free
Copyright
Copyright
Java Masterclass for Software Developers
/
...
/
Summary: Decisions
Summary: Decisions
This lesson summarizes the main points of this chapter.
We'll cover the following...
A program’s flow of control is the order in which
...