Index
Symbols
- % remainder operator, Remainder Operator
- ( ) parentheses, Operators for Strings
- ; semicolon, The Hello World Program, Compiler Error Messages
- <> angle brackets, Piles of Cards
- = assignment operator, Assigning Variables
- == equals operator, Relational Operators, The equals Method
- [ ] square brackets, Creating Arrays
- {} curly braces, The Hello World Program, The if-else Statement
A
- abecedarian, Exercises
- abstract, Abstract Classes
- abstract class, Vocabulary
- accessor, Getters and Setters
- accumulator, Traversing Arrays, Vocabulary
- addition
- address, The System Class, Vocabulary, The toString Method
- algorithm, What Is Computer Science?, Vocabulary
- alias, Copying Arrays, Vocabulary
- aliasing, Subdecks
- allocate, Creating Arrays, Vocabulary
- anagram, Exercises
- and operator, Logical Operators
- angle brackets, Piles of Cards
- Append.java, StringBuilder Objects
- args, Command-Line Arguments
- argument, Parameters and Arguments, Composition, Vocabulary
- ArithmeticException, Other Types of Errors, When I run the program, I get an exception.
- array, Creating Arrays, Vocabulary
- ArrayIndexOutOfBoundsException, Accessing Elements, When I run the program, I get an exception.
- ArrayList, Piles of Cards, CardCollection
- Arrays class, Displaying Arrays, Copying Arrays
- assignment, Assigning Variables, Vocabulary, Relational Operators
- attribute, Point Objects, Vocabulary
- automatic conversion, Floating-Point Numbers, Type Cast Operators, Parameters and Arguments, Relational Operators
- AWT, Point Objects, Graphics, Vocabulary
B
- base case, Recursive Stack Diagrams, Vocabulary
- BigInteger, BigInteger Arithmetic
- binary, Binary Number System, Vocabulary
- binary search, Binary Search, Vocabulary
- block, The if-else Statement, Vocabulary
- Boole, George, Relational Operators
- boolean, Conditionals and Logic, Boolean Methods, Vocabulary
- bottom-up design, The Eights Class, Vocabulary
- bounding box, Graphics Methods, Vocabulary
- brackets
- branch, The if-else Statement, Vocabulary
- breakpoint, Tracing with a Debugger, Vocabulary
- bug, What Is Computer Science?, Vocabulary
- byte code, Compiling Java Programs, Vocabulary
C
- call stack, Recursive Stack Diagrams, Tracing with a Debugger, Vocabulary
- camel case, Defining New Methods
- Canvas, Creating Graphics
- Card, Card Objects
- CardCollection, CardCollection
- case-sensitive, The Hello World Program, Declaring Variables, Defining New Methods, String Comparison
- catch, Exception Handling
- chaining, Chaining and Nesting, Vocabulary
- char, Displaying Two Messages, Characters
- Character, Wrapper Classes, Argument Validation
- charAt, Characters
- Checkstyle, Running Checkstyle
- class, The Hello World Program, Vocabulary, Vocabulary
- Canvas, Creating Graphics
- Card, Card Objects
- CardCollection, CardCollection
- Deck, Decks of Cards
- definition, Designing Classes
- Eights, The Eights Class
- Graphics, Creating Graphics
- Hand, Inheritance
- JFrame, Creating Graphics
- Math, Math Methods
- Pile, Piles of Cards
- Player, The Player Class
- Point, Point Objects
- Rectangle, Objects as Return Values
- relationships, Class Relationships
- Scanner, The Scanner Class
- System, The System Class
- Time, The Time Class
- utility, The Scanner Class
- wrapper, Wrapper Classes
- class diagram, Class Diagrams, Vocabulary, Static Context, Class Relationships
- class variable, Class Variables, Vocabulary
- client, Getters and Setters, Vocabulary
- CodingBat, CodingBat Problems
- collection, Piles of Cards, Vocabulary
- Color, Graphics Methods
- command-line interface, Command-Line Arguments, Command-Line Interface, Vocabulary
- comment, Vocabulary, Example Program
- compareTo, String Comparison, The compareTo Method
- comparison operator, Relational Operators
- compile, Compiling Java Programs, Vocabulary, The compiler is spewing error messages.
- compile-time error, Compiler Error Messages, Vocabulary, Debugging
- complete ordering, The compareTo Method
- composition, Composition, Vocabulary, Class Relationships
- computer science, What Is Computer Science?, Vocabulary
- concatenate, Operators for Strings, Vocabulary, Exercises
- concrete class, Vocabulary
- conditional statement, The if-else Statement, Vocabulary
- constant, Literals and Constants, Vocabulary
- constructor, Constructors, Vocabulary, Card Objects, Decks of Cards, Subdecks
- Convert.java, Putting It All Together, Example Source File
- coordinate, Point Objects, Graphics Methods, Vocabulary
- countdown, Recursive Void Methods
- counter, Building a Histogram
- CPU, What Is a Computer?
- Crazy Eights, Extending Classes
D
- De Morgan’s laws, De Morgan’s Laws, Vocabulary
- debugger, Tracing with a Debugger, Vocabulary
- debugging, What Is Computer Science?, Vocabulary, Debugging
- Deck, Decks of Cards
- declaration, Declaring Variables, Vocabulary, Point Objects
- decrement, Increment and Decrement, Vocabulary
- degrees, Math Methods
- dependent, Getters and Setters
- description, Javadoc Tags, Vocabulary
- design process, Incremental Development, Incremental Design, Vocabulary, Shuffling Decks, The Eights Class
- deterministic, Generating Random Numbers, Vocabulary
- diagram
- class, Class Diagrams, Static Context, Class Relationships
- memory, Memory Diagrams, The indexOf Method, Copying Arrays, Primitives Versus Objects, Point Objects, Constructors, The equals Method, Card toString, Decks of Cards
- stack, Stack Diagrams, Recursive Stack Diagrams, Value-Returning Methods, Recursive Binary Method
- divisible, Remainder Operator
- division
- documentation, Putting It All Together, Java Library Source, Reading Documentation, Vocabulary
- dot notation, Point Objects, Vocabulary
- double, Floating-Point Numbers
- Double, Wrapper Classes
- doubloon, Exercises
- Doubloon.java, Counting Characters
- DrJava, Installing DrJava
E
- Echo.java, The Scanner Class
- efficiency, Building a Histogram, Exercises, Sequential Search, Merge Sort, Exercises, CardCollection
- Eights, The Eights Class
- element, Creating Arrays, Accessing Elements, Vocabulary
- empty array, Command-Line Arguments, Vocabulary
- empty string, String Iteration, Vocabulary
- encapsulate, Incremental Design, Vocabulary
- encapsulation, Exercises, Rectangles Are Mutable
- encode, Card Objects, Vocabulary
- enhanced for loop, The Enhanced for Loop, Vocabulary
- equals, String Comparison, The equals Method, The equals Method
- equivalent, The equals Method, Vocabulary, The compareTo Method
- error
- compile-time, Compiler Error Messages, Debugging
- logic, Other Types of Errors, Debugging, My program doesn’t work.
- message, Debugging Programs, Compiler Error Messages, Compiler Error Messages, The compiler is spewing error messages.
- rounding, Rounding Errors
- run-time, Other Types of Errors, Debugging
- syntax, I’m getting a weird compiler message, and it won’t go away.
- escape sequence, Using Escape Sequences, Vocabulary, Characters
- exception, Other Types of Errors, Debugging, When I run the program, I get an exception.
- Arithmetic, Other Types of Errors
- ArrayIndexOutOfBounds, Accessing Elements
- InputMismatch, Validating Input
- MissingFormatArgument, Reading Error Messages
- NegativeArraySize, Creating Arrays
- NullPointer, The null Keyword, Argument Validation, Arrays of Cards
- NumberFormat, Wrapper Classes
- StackOverflow, Recursive Stack Diagrams
- StringIndexOutOfBounds, String Iteration, Argument Validation
- Exception
- executable, Compiling Java Programs, Vocabulary
- experimental debugging, Debugging Programs
- expression, Arithmetic Operators, Vocabulary, Composition, Composition, Boolean Variables
- extends, Inheritance, Inheritance
- extract digits, Remainder Operator
F
- factorial, Value-Returning Methods, Vocabulary, Exercises
- fibonacci, The Leap of Faith
- FileNotFoundException, When I run the program, I get an exception.
- final, Literals and Constants, Class Variables, Cards Are Immutable
- flag, Boolean Variables, Vocabulary
- floating-point, Floating-Point Numbers, Vocabulary
- flow of execution, Flow of Execution, Vocabulary, Flow of execution
- for, The for Statement
- format specifier, Formatting Output, Vocabulary, Nested Loops
- format string, Formatting Output, Vocabulary, Displaying Objects
- frame, Stack Diagrams, Vocabulary
G
- garbage collection, Garbage Collection, Vocabulary, Class Variables
- generalization, Exercises, Rectangles Are Mutable, Advanced Topics, Vocabulary
- generalize, Incremental Design, Vocabulary
- getter, Getters and Setters, Vocabulary
- GitHub, Using the Code Examples
- Goodbye.java, Displaying Two Messages
- Google style, Formatting Source Code
- Graphics, The GridCanvas Class, Creating Graphics
- Greenfield, Larry, Debugging Programs
- GuessStarter.java, Exercises
H
- hacker, Validating Input, Vocabulary, Argument Validation
- Hand, Inheritance
- hanging, My program hangs.
- hardware, What Is a Computer?, Vocabulary
- HAS-A, Class Relationships, Vocabulary, The GridCanvas Class, UML Diagram
- Hello.java, The Hello World Program
- helper method, Shuffling Decks, Vocabulary
- hexadecimal, The System Class, Formatting Output, The toString Method
- high-level language, Compiling Java Programs, Vocabulary
- histogram, Building a Histogram, Vocabulary, Exercises
- HTML, Java Library Source, Javadoc, Javadoc Tags
I
- IDE, Tools, Vocabulary
- identical, The equals Method, Vocabulary
- if statement, The if-else Statement
- immutable, Strings Are Immutable, Vocabulary, Mutable Versus Immutable, Cards Are Immutable
- import statement, The Scanner Class, Vocabulary
- increment, Increment and Decrement, Vocabulary
- incremental development, Incremental Development, Vocabulary
- independent, Getters and Setters
- index, Vocabulary, Accessing Elements, Vocabulary, Arrays of Cards
- indexOf, The indexOf Method
- infinite loop, The while Statement, Vocabulary, My program hangs.
- infinite recursion, Constructors, My program hangs., Infinite recursion
- information hiding, The Time Class, Vocabulary
- inheritance, Inheritance, Class Relationships, Vocabulary, Advanced Topics, Interfaces
- initialize, Assigning Variables, Vocabulary, Boolean Variables
- inner loop, Nested Loops
- InputMismatchException, Validating Input
- instance, Designing Classes, Vocabulary
- instance method, The toString Method, Adding Times, Vocabulary
- instance variable, The Time Class, Vocabulary
- instantiate, Designing Classes, Vocabulary
- Integer, Wrapper Classes
- integer division, Arithmetic Operators, Floating-Point Numbers
- interactions, DrJava Interactions
- interface, Interfaces
- interpret, Compiling Java Programs, Vocabulary
- InterruptedException, The Simulation Loop
- invoke, Defining New Methods, Vocabulary
- IS-A, Class Relationships, Vocabulary, The GridCanvas Class, UML Diagram, An Initial Drawing
- iteration, The for Statement, String Iteration, Vocabulary
- iterative, Recursive Methods, Vocabulary
J
- JAR, Installing DrJava, Vocabulary
- Java Tutor, Stack Diagrams, CodingBat Problems
- java.awt, Point Objects, Graphics
- java.io, The System Class
- java.lang, The Scanner Class
- java.math, BigInteger Arithmetic
- java.util, The Scanner Class
- javac, Compiling Java Programs
- Javadoc, Java Library Source, Installing DrJava, Javadoc, Javadoc Tags, Vocabulary
- JDK, Installing DrJava, Vocabulary
- JFrame, Starting the Game, Creating Graphics
- JVM, Compiling Java Programs, Installing DrJava, Vocabulary
L
- language
- leap of faith, The Leap of Faith, Vocabulary, Adding Recursion
- length
- library, The System Class, Vocabulary, Java Library Source
- Linux, Debugging Programs
- literal, Literals and Constants, Vocabulary
- local variable, Parameters and Arguments, Vocabulary
- Logarithm.java, Example Program
- logic error, Other Types of Errors, Vocabulary, Debugging, My program doesn’t work.
- logical operator, Logical Operators, Vocabulary, The compareTo Method
- long, Math Methods
- loop, The while Statement, Vocabulary
- loop body, The while Statement, Vocabulary
- loop variable, Nested Loops, Vocabulary, Accessing Elements
- low-level language, Compiling Java Programs, Vocabulary
M
- magic number, Literals and Constants, Vocabulary
- main, The Hello World Program, Defining New Methods
- map to, Card Objects
- Math class, Math Methods
- memory, What Is a Computer?, Vocabulary
- memory diagram, Memory Diagrams, Vocabulary, The indexOf Method, Copying Arrays, Primitives Versus Objects, Point Objects, Constructors, The equals Method, Card toString, Decks of Cards
- mental model, My program doesn’t work.
- merge, Merging Decks
- merge sort, Merge Sort, Vocabulary
- method, The Hello World Program, Vocabulary
- accessor, Getters and Setters
- boolean, Boolean Methods
- constructor, Constructors
- equals, The equals Method, The equals Method
- getter, Getters and Setters
- helper, Shuffling Decks
- instance, The toString Method, Adding Times
- modifier, CardCollection
- mutator, Getters and Setters
- parameters, Multiple Parameters
- setter, Getters and Setters
- static, Adding Times
- toString, The toString Method
- value, Return Values
- Mickey Mouse, Example Drawing
- MissingFormatArgumentException, Reading Error Messages
- modifier method, CardCollection
- modulo, Remainder Operator, Vocabulary
- modulus, Remainder Operator, Vocabulary
- multidimensional array, Two-Dimensional Arrays, Vocabulary
- mutable, Rectangles Are Mutable, Mutable Versus Immutable, Vocabulary
- mutator, Getters and Setters
N
- NaN, Vocabulary
- NegativeArraySizeException, Creating Arrays
- neighbor, Conway’s Game of Life, Counting Neighbors
- nested, I added so many print statements I get inundated with output.
- nesting, Chaining and Nesting, Vocabulary, Arrays of Cards
- new, The Scanner Class, Exercises, Creating Arrays, Point Objects, Constructors
- newline, Displaying Two Messages, Vocabulary, Recursive Void Methods
- NewLine.java, Defining New Methods
- next
- nextInt
- nondeterministic, Generating Random Numbers, Vocabulary
- not operator, Logical Operators
- null, The null Keyword, Arrays of Cards
- NullPointerException, The null Keyword, Argument Validation, When I run the program, I get an exception.
- NumberFormatException, Wrapper Classes
O
- object, Immutable Objects, Vocabulary
- Object class, Inheritance
- object code, Compiling Java Programs, Vocabulary
- object-oriented, Immutable Objects, Vocabulary, Rectangles Are Mutable, Class Relationships
- off-by-one, Subdecks, Vocabulary
- operand, Arithmetic Operators, Vocabulary
- operator, Arithmetic Operators, Vocabulary
- assignment, Relational Operators
- cast, Type Cast Operators
- logical, Logical Operators, The compareTo Method
- new, The Scanner Class, Exercises, Creating Arrays, Point Objects, Constructors
- redirection, Command-Line Testing
- relational, Relational Operators
- remainder, Remainder Operator
- string, Operators for Strings
- or operator, Logical Operators
- order of operations, Operators for Strings, Vocabulary, I’ve got a big, hairy expression and it doesn’t do what I expect.
- ordering, The compareTo Method
- outer loop, Nested Loops
- overload, Value Constructors, Subdecks
- overloaded, Substrings
- overloading, Vocabulary
- override, The toString Method, Vocabulary, Exercises
P
- package, The System Class, Vocabulary
- paint, Creating Graphics
- palindrome, Exercises
- param tag, Javadoc Tags
- parameter, Parameters and Arguments, Vocabulary, Objects as Parameters
- parameter passing, Parameters and Arguments, Vocabulary
- parentheses, Operators for Strings
- parse, Compiler Error Messages, Vocabulary, Wrapper Classes, Vocabulary
- partial ordering, The compareTo Method
- pi, Math Methods
- Pile, Piles of Cards
- pixel, Graphics Methods, Vocabulary
- Player, The Player Class
- Point, Point Objects
- polymorphism, An Initial Drawing, Interfaces, Vocabulary
- portable, Compiling Java Programs, Vocabulary
- precedence, Operators for Strings, I’ve got a big, hairy expression and it doesn’t do what I expect.
- primitive, Primitives Versus Objects, Vocabulary
- print, Displaying Two Messages, The toString Method
- print statement, The Hello World Program, Vocabulary, Displaying Objects, I added so many print statements I get inundated with output., My print statement isn’t doing anything.
- printDeck, Decks of Cards
- printf, Formatting Output, String Formatting, Displaying Objects
- println, The Hello World Program
- PrintTime.java, Multiple Parameters
- PrintTwice.java, Parameters and Arguments
- private, Class Diagrams, The Time Class, Getters and Setters
- problem solving, Computer Programming, Vocabulary
- processor, What Is a Computer?, Vocabulary
- program, What Is Programming?, Vocabulary
- programming, What Is Programming?, Vocabulary
- prompt, Literals and Constants, Vocabulary
- protected, Abstract Classes
- pseudocode, Shuffling Decks, Vocabulary
- pseudorandom, Generating Random Numbers, Vocabulary
- public, Defining New Methods
R
- radians, Math Methods
- RAM, What Is a Computer?
- Random, Generating Random Numbers
- randomInt, Shuffling Decks
- rank, Arrays of Objects
- rational number, Exercises
- Rectangle, Objects as Return Values
- recursion, Value-Returning Methods
- recursive, Recursive Methods, Vocabulary
- redirection operator, Command-Line Testing, Vocabulary
- reduce, Traversing Arrays, Building a Histogram, Vocabulary
- refactor, Vocabulary
- refactoring, Refactoring
- reference, Accessing Elements, Vocabulary, Point Objects, Aliasing Revisited, Card toString, Subdecks
- relational operator, Relational Operators, Vocabulary
- remainder, Remainder Operator
- replace, Strings Are Immutable
- repository, Using the Code Examples
- return, Return Values, Example Program, Objects as Return Values
- return statement, My method doesn’t return what I expect.
- return tag, Javadoc Tags
- return type, Return Values, Vocabulary
- return value, Return Values, Vocabulary
- RGB, Graphics Methods, Vocabulary
- rounding error, Rounding Errors, Vocabulary
- row-major order, Two-Dimensional Arrays, Vocabulary
- rubber duck, No, I really need help.
- run-time error, Other Types of Errors, Vocabulary, Validating Input, Arrays of Cards, Debugging
S
- scaffolding, Incremental Development, Vocabulary
- Scanner, The Scanner Class
- scope, Stack Diagrams, Vocabulary, Scope Revisited
- Scrabble, Exercises, Exercises
- search, Traversing Arrays, Vocabulary
- selection sort, Selection Sort, Vocabulary
- semicolon, The Hello World Program, Compiler Error Messages
- sequential search, Sequential Search, Vocabulary
- setter, Getters and Setters, Vocabulary
- shadowing, Value Constructors, Vocabulary
- short-circuit evaluation, Logical Operators, Vocabulary, Argument Validation
- shuffle, Shuffling Decks, Shuffling Decks
- signature, Reading Documentation, Vocabulary
- sleep, The Simulation Loop
- sort
- source code, Compiling Java Programs, Vocabulary, Java Library Source
- specialization, Advanced Topics, Vocabulary
- sprite, Event Listeners, Vocabulary
- src.zip, Java Library Source
- stable configuration, Conway’s Game of Life
- stack diagram, Stack Diagrams, Vocabulary, Recursive Stack Diagrams, Value-Returning Methods, Recursive Binary Method
- stack trace, Reading Error Messages, Vocabulary, When I run the program, I get an exception.
- StackOverflowError, Recursive Stack Diagrams, Constructors, My program hangs., When I run the program, I get an exception.
- state, Memory Diagrams, Vocabulary
- statement, The Hello World Program, Vocabulary
- assignment, Assigning Variables
- comment, The Hello World Program
- conditional, The if-else Statement
- declaration, Declaring Variables, Point Objects
- else, The if-else Statement
- for, The for Statement
- if, The if-else Statement
- import, The Scanner Class
- initialization, Boolean Variables
- print, Displaying Two Messages, The toString Method, I added so many print statements I get inundated with output., My print statement isn’t doing anything.
- return, Return Values, Example Program, Objects as Return Values, Sequential Search, My method doesn’t return what I expect.
- switch, The switch Statement
- while, The while Statement
- Statement
- static, Constructors, Adding Times, Class Variables
- static context, Static Context, Vocabulary
- string, Displaying Two Messages, Vocabulary
- String class, Mutable Objects
- StringBuilder, StringBuilder Objects, Exercises
- StringIndexOutOfBoundsException, String Iteration, Argument Validation
- stub, Incremental Development, Vocabulary
- style guide, Formatting Source Code
- subclass, Inheritance, Vocabulary
- subdeck, Subdecks
- substring, Substrings
- suit, Arrays of Objects
- superclass, Inheritance, Vocabulary
- Surprise.java, Mutable Versus Immutable
- swapCards, Shuffling Decks
- switch statement, The switch Statement
- syntax, Debugging
- syntax errors, I’m getting a weird compiler message, and it won’t go away.
- System.err, Validating Input, Testing with JUnit
- System.in, The Scanner Class, Immutable Objects, Command-Line Testing
- System.out, The System Class, Immutable Objects, Command-Line Testing
T
- tag, Javadoc Tags, Vocabulary
- temporary variable, Return Values, Vocabulary, I’ve got a big, hairy expression and it doesn’t do what I expect.
- terminal, Command-Line Interface
- testing, Incremental Development, Validating Input, Exercises, Command-Line Testing
- text editor, Installing DrJava, Vocabulary
- this, Scope Revisited, Constructors, Static Context, CardCollection
- Thread.sleep, The Simulation Loop
- throw, More Constructors
- Time, The Time Class
- toCharArray, Counting Characters
- token, Language Elements, Vocabulary
- toLowerCase, Strings Are Immutable
- top-down design, Shuffling Decks, Vocabulary
- top-down development, The Player Class, The Eights Class
- Torvalds, Linus, Debugging Programs
- toString, Objects as Parameters, The toString Method
- toUpperCase, Strings Are Immutable
- tracing, Stack Diagrams, Tracing the Code, Tracing with a Debugger, Flow of execution
- traversal, Traversing Arrays, Vocabulary
- traverse, Sequential Search
- try, Exception Handling
- two-dimensional table, Incremental Design
- type, Vocabulary
- array, Creating Arrays
- boolean, Conditionals and Logic, Boolean Variables
- char, Declaring Variables, Characters
- double, Floating-Point Numbers
- int, Declaring Variables
- long, Rounding Errors, Math Methods
- object, Designing Classes
- String, Displaying Two Messages, Declaring Variables, Mutable Objects
- void, Defining New Methods
- type cast, Type Cast Operators, Vocabulary
U
- UML, Class Diagrams, Vocabulary, Static Context, Class Relationships
- Unicode, Characters, Vocabulary
- unit test, Testing with JUnit, Vocabulary
- utility class, The Scanner Class, Displaying Arrays
V
- validate, Validating Input, Vocabulary, Argument Validation
- value, Declaring Variables, Vocabulary
- value constructor, Value Constructors
- value method, Return Values
- variable, Declaring Variables, Vocabulary
- instance, The Time Class
- local, Parameters and Arguments
- loop, Nested Loops, Accessing Elements
- private, Class Diagrams, The Time Class, Getters and Setters
- static, Class Variables
- temporary, Return Values, I’ve got a big, hairy expression and it doesn’t do what I expect.
- virtual machine, Compiling Java Programs, Vocabulary, Installing DrJava
- void, Defining New Methods, Return Values, Vocabulary