
Nguồn ngoài
Think Java - How to Think Like a Computer Scientist
Think Java is an introduction to computer science and programming intended for readers with little or no experience. We start with the most basic concepts and are careful to define all terms when they are first used. The book presents each new idea in a logical progression. Larger topics, like recursion and object-oriented programming, are divided into smaller examples and introduced over the course of several chapters.
- Tác giả
- Allen B. Downey
- Nhà xuất bản
- lin College
- Nguồn
- LibreTexts
- Giấy phép
- CC BY-NC-SA
- Ngôn ngữ
- EN
- Danh mục
- Công nghệ thông tin
Mục lục· 186 mục
- 01: Objects
- 1.01: Point Objects
- 1.02: Attributes
- 1.03: Objects as Parameters
- 1.04: Objects as Return Types
- 1.05: Mutable Objects
- 1.06: Aliasing
- 1.07: The null Keyword
- 1.08: Garbage Collection
- 1.09: Class Diagrams
- 1.10: Java Library Source
- 1.11: Vocabulary
- 1.12: Exercises
- 02: Classes
- 2.01: The Time Class
- 2.02: Constructors
- 2.03: More Constructors
- 2.04: Getters and Setters
- 2.05: Displaying Objects
- 2.06: The toString Method
- 2.07: The equals Method
- 2.08: Adding Times
- 2.09: Pure Methods and Modifiers
- 2.10: Vocabulary
- 2.11: Exercises
- 03: Arrays of Objects
- 3.01: Card Objects
- 3.02: Card toString
- 3.03: Class Variables
- 3.04: The compareTo Method
- 3.05: Cards are Immutable
- 3.06: Arrays of Cards
- 3.07: Sequential Search
- 3.08: Binary Search
- 3.09: Tracing the Code
- 3.10: Recursive Version
- 3.11: Vocabulary
- 3.12: Exercises
- 04: Objects of Arrays
- 4.01: The Deck Class
- 4.02: Shuffling Decks
- 4.03: Selection Sort
- 4.04: Merge Sort
- 4.05: Subdecks
- 4.06: Merging Decks
- 4.07: Adding Recursion
- 4.08: Vocabulary
- 4.09: Exercises
- 05: Objects of Objects
- 5.01: Decks and Hands
- 5.02: CardCollection
- 5.03: Inheritance
- 5.04: Dealing Cards
- 5.05: The Player Class
- 5.06: The Eights Class
- 5.07: Class Relationships
- 5.08: Vocabulary
- 5.09: Exercises
- 06: Appendix A - Development Tools
- 6.01: Installing DrJava
- 6.02: DrJava Interactions
- 6.03: Command-line Interface
- 6.04: Command-line Testing
- 6.05: Running Checkstyle
- 6.06: Tracing With a Debugger
- 6.07: Testing with JUnit
- 6.08: Vocabulary
- 07: Appendix B - Java 2D Graphics
- 7.01: Creating Graphics
- 7.02: Graphics Methods
- 7.03: Example Drawing
- 7.04: Vocabulary
- 7.05: Exercises
- 08: Appendix C - Debugging
- 8.01: Compile-time Errors
- 8.02: Run-time Errors
- 8.03: Logic Errors
- 09: The Way of the Program
- 9.01: What Is Programming
- 9.02: What Is Computer Science
- 9.03: Programming Languages
- 9.04: The Hello World Program
- 9.05: Displaying Strings
- 9.06: Escape Sequences
- 9.07: Formatting Code
- 9.08: Debugging Code
- 9.09: Vocabulary
- 9.10: Exercises
- 10: Variables and Operators
- 10.01: Declaring Variables
- 10.02: Assignment
- 10.03: State Diagrams
- 10.04: Printing Variables
- 10.05: Arithmetic Operators
- 10.06: Floating-Point Numbers
- 10.07: Rounding Errors
- 10.08: Operators for Strings
- 10.09: Composition
- 10.10: Types of Errors
- 10.11: Vocabulary
- 10.12: Exercises
- 11: Input and Output
- 11.01: The System Class
- 11.02: The Scanner Class
- 11.03: Program Structure
- 11.04: Inches to Centimeters
- 11.05: Literals and Constants
- 11.06: Formatting Output
- 11.07: Centimeters to Inches
- 11.08: Modulus Operator
- 11.09: Putting It All Together
- 11.10: The Scanner Bug
- 11.11: Vocabulary
- 11.12: Exercises
- 12: Void Methods
- 12.01: Math Methods
- 12.02: Composition Revisited
- 12.03: Adding New Methods
- 12.04: Flow of Execution
- 12.05: Parameters and Arguments
- 12.06: Multiple Parameters
- 12.07: Stack Diagrams
- 12.08: Reading Documentation
- 12.09: Writing Documentation
- 12.10: Vocabulary
- 12.11: Exercises
- 13: Conditionals and Logic
- 13.01: Relational Operators
- 13.02: Logical Operators
- 13.03: Conditional Statements
- 13.04: Chaining and Nesting
- 13.05: Flag Variables
- 13.06: The Return Statement
- 13.07: Validating Input
- 13.08: Recursive Methods
- 13.09: Recursive Stack Diagrams
- 13.10: Binary Numbers
- 13.11: Vocabulary
- 13.12: Exercises
- 14: Value Methods
- 14.01: Return Values
- 14.02: Writing Methods
- 14.03: Method Composition
- 14.04: Overloading
- 14.05: Boolean Methods
- 14.06: Javadoc Tags
- 14.07: More Recursion
- 14.08: Leap of Faith
- 14.09: One More Example
- 14.10: Vocabulary
- 14.11: Exercises
- 15: Loops
- 15.01: The while Statement
- 15.02: Generating Tables
- 15.03: Encapsulation and Generalization
- 15.04: More Generalization
- 15.05: The for Statement
- 15.06: The do-while Loop
- 15.07: Break and Continue
- 15.08: Vocabulary
- 15.09: Exercises
- 16: Arrays
- 16.01: Creating Arrays
- 16.02: Accessing Elements
- 16.03: Displaying Arrays
- 16.04: Copying Arrays
- 16.05: Array Length
- 16.06: Array Traversal
- 16.07: Random Numbers
- 16.08: Traverse and Count
- 16.09: Building a Histogram
- 16.10: The Enhanced for Loop
- 16.11: Vocabulary
- 16.12: Exercises
- 17: Strings and Things
- 17.01: Characters
- 17.02: Strings Are Immutable
- 17.03: String Traversal
- 17.04: Substrings
- 17.05: The indexOf Method
- 17.06: String Comparison
- 17.07: String Formatting
- 17.08: Wrapper Classes
- 17.09: Command-line Arguments
- 17.10: Vocabulary
- 17.11: Exercises