Next:
Thread class
Up:
Multithreading
Previous:
Life cycle of a
Contents
How to create thread
There are two ways to create a thread:
By extending Thread class
By implementing Runnable interface.
Subsections
Thread class
Java Thread Example by extending Thread class
Thread Scheduler in Java
Sleep method in java
The
join()
method
getName(),setName(String)
and
getId()
method:
The
currentThread()
method
Naming Thread
Current Thread
Priority of a Thread (Thread Priority)
Daemon Thread in Java
Java Thread Pool
ThreadGroup in Java
Java Shutdown Hook
Performing single task by multiple threads
Performing multiple tasks by multiple threads (multitasking in multithreading)
Annonymous class that implements Runnable interface
Java Garbage Collection
How can an object be unreferenced?
finalize() method
gc() method
Java Runtime class
Java Runtime exec() method
How to shutdown system in Java
Java Runtime freeMemory() and totalMemory() method