Copying an Entire Directory The Files.copy() method only copies a single file or creates an empty directory at its destination,… Read more
Searching for Directory Entries – Java I/O: Part II
Searching for Directory Entries The find() method of the Files class can be used for searching or finding directory entries… Read more
Understanding Concurrency and Parallelism – Concurrency: Part I
Understanding Concurrency and Parallelism There is an important distinction between the concept of parallelism and concurrency when it comes to… Read more
Directory Hierarchy Traversal – Java I/O: Part II
Directory Hierarchy Traversal Tree traversal is an important topic in computer science. Other synonyms used in the literature for traversing… Read more
Runtime Organization for Thread Execution – Concurrency: Part I
22.2 Runtime Organization for Thread Execution Most JVM implementations run as a single process, but allow multiple threads to be… Read more
Creating Threads – Concurrency: Part I
22.3 Creating Threads A thread in Java is represented by an object of the java.lang.Thread class. Every thread in Java… Read more
Extending the Thread Class – Concurrency: Part I
Extending the Thread Class A class can also extend the Thread class to create a thread. A typical procedure for… Read more
Types of Threads – Concurrency: Part I
Types of Threads The runtime environment distinguishes between normal threads (also called user threads) and daemon threads. As long as… Read more
Thread Lifecycle – Concurrency: Part I
22.4 Thread Lifecycle Before diving into the lifecycle of a thread, a few important thread-related concepts should be understood. Objects,… Read more
Thread States – Concurrency: Part I
Thread States Understanding the lifecycle of a thread can be beneficial when programming with threads. Threads can exist in different… Read more