Introduction to Programming in Java: An Interdisciplinary Approach, 2nd edition

Published by Addison Wesley (June 21, 2021) © 2017

  • Robert Sedgewick
  • Kevin Wayne

In this eTextbook — More ways to learn

  • More flexible. Start learning right away, on any device.
  • More supportive. Get AI explanations and practice questions (select titles).
  • More interactive. Bring learning to life with audio, videos, and diagrams.
  • More memorable. Make concepts stick with highlights, search, notes, and flashcards.
  • More understandable. Translate text into 100+ languages with one tap.

In this eTextbook — More ways to learn

  • More flexible. Start learning right away, on any device.
  • More supportive. Get AI explanations and practice questions (select titles).
  • More interactive. Bring learning to life with audio, videos, and diagrams.
  • More memorable. Make concepts stick with highlights, search, notes, and flashcards.
  • More understandable. Translate text into 100+ languages with one tap.

In this eTextbook — More ways to learn

  • More flexible. Start learning right away, on any device.
  • More supportive. Get AI explanations and practice questions (select titles).
  • More interactive. Bring learning to life with audio, videos, and diagrams.
  • More memorable. Make concepts stick with highlights, search, notes, and flashcards.
  • More understandable. Translate text into 100+ languages with one tap.

Table of contents

Programs viii

Preface xi

 

Chapter 1: Elements of Programming 1

1.1 Your First Program 2

1.2 Built-in Types of Data 14

1.3 Conditionals and Loops 50

1.4 Arrays 90

1.5 Input and Output 126

1.6 Case Study: Random Web Surfer 170

 

Chapter 2: Functions and Modules 191

2.1 Defining Functions 192

2.2 Libraries and Clients 226

2.3 Recursion 262

2.4 Case Study: Percolation 300

 

Chapter 3: Object-Oriented Programming 329

3.1 Using Data Types 330

3.2 Creating Data Types 382

3.3 Designing Data Types 428

3.4 Case Study: N-Body Simulation 478

 

Chapter 4: Algorithms and Data Structures 493

4.1 Performance 494

4.2 Sorting and Searching 532

4.3 Stacks and Queues 566

4.4 Symbol Tables 624

4.5 Case Study: Small-World Phenomenon 670

 

Context 715

 

Glossary 721

Index 729

APIs 751

Author bios

This publication contains markup to enable structural navigation and compatibility with assistive technologies. Images in the publication MAY NOT be fully described, which is a barrier to those who rely on alternative text descriptions. The publication supports text reflow and contains no content hazards known to cause adverse physical reactions.

Need help?Get in touch