Table of Contents
+-What is a computer?
What is programming?
Hello, World
Compiling Java programs
Displaying messages
Formatting source code
What is computer science?
+-Declaring variables
Assigning variables
Memory diagrams
printing variables
Arithmetic operators
Floating-point numbers
Rounding errors
String operators
+-The System class
The Scanner class
Language elements
Literals and constants
Formatting output
Error messages
Type cast operators
Remainder Operator
+-Defining new methods
Parameters and arguments
Stack Diagrams
Math methods
Composition
Return values
Incremental development
+-Relational operators
The if-else statement
Chaining and nesting
The switch statement
Logical operators
Boolean variables
Boolean methods
Validating input
+-The while statement
The for statement
Nested loops
Characters
String iteration
The indexOf method
Substrings
String comparison
String formatting
+-Creating arrays
Accessing elements
Displaying arrays
Copying arrays
Traversing arrays
Random numbers
Building a histogram
The enhanced for loop
Counting characters
+-Recursive void methods
Recursive stack diagrams
Value-Returning methods
The leap of faith
Counting up recursively
Binary number system
Recursive binary method
CodingBat problems
+-Primitives vs Objects
The null Keyword
Strings Are Immutable
Wrapper Classes
Command-Line Arguments
Argument Validation
BigInteger Arithmetic
+-Point Objects
Objects as Parameters
Objects as Return Values
Rectangles Are Mutable
Aliasing Revisited
Class Diagrams
Mutable vs Immutable
StringBuilder Objects
+-The Time class
Constructors
Getters and setters
Displaying objects
The toString method
The equals method
Adding Times
+-Card objects
Card toString
Class variables
The compareTo method
Cards are immutable
Arrays of Cards
Sequential search
Binary search
+-Decks of Cards
Shuffling Decks
Selection sort
Merge sort
Subdecks
Merging Decks
Adding recursion
Static context
Piles of Cards
Playing war
+-CardCollection
Inheritance
Dealing Cards
The Player class
The Eights class
Class relationships
+-Conway’s game of life
The cell class
Two-dimensional arrays
The GridCanvas class
Other Grid methods
Starting the game
Exception handling
Counting neighbors
Updating the Grid
+-Langton’s ant
Refactoring
Abstract classes
UML diagram
+-Polygon objects
Adding color
Regular Polygons
More constructors
An initial drawing
Blinking Polygons
Interfaces
Event Listeners
Timers