Creating Regular Directories The Files class provides two methods to create regular directories. The create-Directory() method fails to create a… Read more
Notified – Concurrency: Part I
Notified Invoking the notify() method on an object wakes up a single thread that is waiting for the lock of… Read more
Interrupted – Concurrency: Part I
Interrupted This means that another thread invoked the interrupt() method on the waiting thread. The awakened thread is enabled as… Read more
Joining – Concurrency: Part I
Joining A thread can invoke the overloaded method join() (from the Thread class) on another thread in order to wait… Read more
Threads and Concurrency – Concurrency: Part I
22.1 Threads and Concurrency We first look at some basic concepts before diving into multithreaded programming in Java. Multitasking Multitasking… Read more
Blocking for I/O – Concurrency: Part I
Blocking for I/O A running thread, on executing a blocking operation requiring a resource (like a call to an I/O… Read more
Deprecated Thread Methods – Concurrency: Part I
Deprecated Thread Methods There are a few operations defined by the Thread class that are not recommended for use and… Read more
Listing the Immediate Entries in a Directory – Java I/O: Part II
Listing the Immediate Entries in a Directory A common file operation is to list the entries in a directory, similar… Read more
Walking the Directory Hierarchy – Java I/O: Part II
Walking the Directory Hierarchy The walk() method of the Files class creates a stream to walk or traverse the directory… Read more
Limiting Traversal by Depth Specification – Java I/O: Part II
Limiting Traversal by Depth Specification The walk() method at (4) in Example 21.5 is called multiple times in the for(;;)… Read more