Section 23.1 Introduction

• Two tasks that are operating concurrently are both making progress at once.

• Two tasks that are operating in parallel are executing simultaneously. In this sense, parallelism is a subset of concurrency. Today’s multi-core computers have multiple processors that can perform tasks in parallel.

• Java makes concurrency available to you through the language and APIs.

• Java programs can have multiple threads of execution, where each thread has its own methodcall stack and program counter, allowing it to execute concurrently with other threads. This capability is called multithreading.

• In a multithreaded application, threads can be distributed across multiple processors (if available) so that multiple tasks execute ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.