Thread Priorities
Every thread has a priority, which can be set by the user with setPriority( int ) using constants MIN_PRIORITY (1), MAX_PRIORITY(10), or NORM_PRIORITY, or it inherits the priority of the thread it was created from.
Whenever the thread scheduler picks a thread to run, it picks the highest priority thread that is currently runnable, which is fixed priority scheduling. (If there is more than one thread with the same priority, each thread gets a turn in some order.) Lower priority threads are not run as long as there is a runnable higher priority thread.
The scheduling is also preemptive: if a higher priority thread becomes available, it is run.
The Java Run-time itself does not have time slicing, but time slicing may be provided by the underlying operating system.