Threads Section Index | Page 6

Why is declared public? Shouldn't it be declared protected, as only the Thread superclass can invoke it?

How does JavaMail handle thread management? Looks like by default, most of the threads created by JavaMail while fetching the messages from a Store/Folder object are not being released automatically. Do I need to explicitely invoke any method so that these threads get released?

What is the difference between multithreading and multitasking? What about multiprogramming? Multiprocessing?

When exactly is the AWT thread started?

Does the main thread get terminated after returning from main(), even after spawning one or more threads?

What is InterruptedException? Why do we need to catch it when calling Thread.sleep()?

What is the mechanism of Thread Priority & Thread Scheduler? How do Threads with various priority levels behave in time-sliced and non-time-sliced environments?

What threads are initialized when you start an application? (I heard six. What do they do?)

Is there a limit to the number of threads that can be spawned in a program?

What is deadlock? How can I eliminate it?

Is there a way in Java to check whether an object is locked (i.e. some thread has it) in a non-blocking fashion?

When and why is IllegalMonitorStateException thrown?

What is the difference between threads and interrupts ?

What is the difference between a thread and a process?

How does one read a thread dump? (Especially the first line, '"47" (TID:0x1780818, sys_thread_t:0x9b4780, state:CW, native ID:0xd4) prio=5', and the Monitor Cache Dump.)

About | Sitemap | Contact