Creating Regular Directories The Files class provides two methods to create regular directories. The create-Directory() method fails to create a… Read more
Category: Executing Synchronized Code
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
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
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
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
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 Priorities – Concurrency: Part I
Thread Priorities Threads are assigned priorities that the thread scheduler can use to determine how the threads will be scheduled…. Read more
Creating Temporary Directories – Java I/O: Part II
Creating Temporary Directories Analogous to temporary files, temporary directories can be created by the create-TempDirectory() methods of the Files class…. Read more