Think Java: How to Think Like a Computer Scientist
Free

Think Java: How to Think Like a Computer Scientist

By Allen B. Downey
Free
Book Description
Table of Contents
  • Preface
  • The way of the program
    • What is a programming language?
    • What is a program?
    • What is debugging?
    • Formal and natural languages
    • The first program
    • Glossary
    • Exercises
  • Variables and types
    • More printing
    • Variables
    • Assignment
    • Printing variables
    • Keywords
    • Operators
    • Order of operations
    • Operators for Strings
    • Composition
    • Glossary
    • Exercises
  • Void methods
    • Floating-point
    • Converting from double to int
    • Math methods
    • Composition
    • Adding new methods
    • Classes and methods
    • Programs with multiple methods
    • Parameters and arguments
    • Stack diagrams
    • Methods with multiple parameters
    • Methods that return values
    • Glossary
    • Exercises
  • Conditionals and recursion
    • The modulus operator
    • Conditional execution
    • Alternative execution
    • Chained conditionals
    • Nested conditionals
    • The return statement
    • Type conversion
    • Recursion
    • Stack diagrams for recursive methods
    • Glossary
    • Exercises
  • GridWorld: Part 1
    • Getting started
    • BugRunner
    • Exercises
  • Value methods
    • Return values
    • Program development
    • Composition
    • Overloading
    • Boolean expressions
    • Logical operators
    • Boolean methods
    • More recursion
    • Leap of faith
    • One more example
    • Glossary
    • Exercises
  • Iteration and loops
    • Multiple assignment
    • The while statement
    • Tables
    • Two-dimensional tables
    • Encapsulation and generalization
    • Methods and encapsulation
    • Local variables
    • More generalization
    • Glossary
    • Exercises
  • Strings and things
    • Characters
    • Length
    • Traversal
    • Run-time errors
    • Reading documentation
    • The indexOf method
    • Looping and counting
    • Increment and decrement operators
    • Strings are immutable
    • Strings are incomparable
    • Glossary
    • Exercises
  • Mutable objects
    • Packages
    • Point objects
    • Instance variables
    • Objects as parameters
    • Rectangles
    • Objects as return types
    • Objects are mutable
    • Aliasing
    • null
    • Garbage collection
    • Objects and primitives
    • Glossary
    • Exercises
  • GridWorld: Part 2
    • Termites
    • Langton's Termite
    • Exercises
  • Create your own objects
    • Class definitions and object types
    • Time
    • Constructors
    • More constructors
    • Creating a new object
    • Printing objects
    • Operations on objects
    • Pure functions
    • Modifiers
    • Fill-in methods
    • Incremental development and planning
    • Generalization
    • Algorithms
    • Glossary
    • Exercises
  • Arrays
    • Accessing elements
    • Copying arrays
    • Arrays and objects
    • for loops
    • Array length
    • Random numbers
    • Array of random numbers
    • Counting
    • The histogram
    • A single-pass solution
    • Glossary
    • Exercises
  • Arrays of Objects
    • The Road Ahead
    • Card objects
    • The printCard method
    • The sameCard method
    • The compareCard method
    • Arrays of cards
    • The printDeck method
    • Searching
    • Decks and subdecks
    • Glossary
    • Exercises
  • Objects of Arrays
    • The Deck class
    • Shuffling
    • Sorting
    • Subdecks
    • Shuffling and dealing
    • Mergesort
    • Class variables
    • Glossary
    • Exercises
  • Object-oriented programming
    • Programming languages and styles
    • Object methods and class methods
    • The toString method
    • The equals method
    • Oddities and errors
    • Inheritance
    • The class hierarchy
    • Object-oriented design
    • Glossary
    • Exercises
  • GridWorld: Part 3
    • ArrayList
    • Interfaces
    • public and private
    • Game of Life
    • LifeRunner
    • LifeRock
    • Simultaneous updates
    • Initial conditions
    • Exercises
  • Graphics
    • Java 2D Graphics
    • Graphics methods
    • Coordinates
    • Color
    • Mickey Mouse
    • Glossary
    • Exercises
  • Input and Output in Java
    • System objects
    • Keyboard input
    • File input
    • Catching exceptions
  • Program development
    • Strategies
    • Failure modes
  • Debugging
    • Syntax errors
    • Run-time errors
    • Logic errors
The book hasn't received reviews yet.
You May Also Like
The Java EE 7 Tutorial
Free
The Java EE 7 Tutorial
By Oracle Corporation
Open Data Structures
Free
Open Data Structures
By Pat Morin
JavaKid811
Free
JavaKid811
By Unknown
OSGi in Practice
Free
OSGi in Practice
By Neil Bartlett
Java 3D Programming
Free
Java 3D Programming
By Daniel Selman
The Java EE 6 Tutorial
Free
The Java EE 6 Tutorial
By Oracle Corporation
NIO_Paper
Free
NIO_Paper
By Unknown
Think Complexity
Free
Think Complexity
By Allen B. Downey
Also Available On
Categories
Curated Lists