M
Michelle
Hi all,
I'm learning java right now and when I come to
threads (Thread class), I have some questions to
clarify before I move on.
I tried and found that the Thread.getName() can
give me the name of curren thread. However,
is it possible to check if some other threads
exist before I create it? For example, my current
thread is named Thread_1 and I want to know if
Thread_2 has been created before I start one.
Besides, is it also possible to know which threads
exists before I quit my program? Probably by name,
count, or whatever?
Thanks.
I'm learning java right now and when I come to
threads (Thread class), I have some questions to
clarify before I move on.
I tried and found that the Thread.getName() can
give me the name of curren thread. However,
is it possible to check if some other threads
exist before I create it? For example, my current
thread is named Thread_1 and I want to know if
Thread_2 has been created before I start one.
Besides, is it also possible to know which threads
exists before I quit my program? Probably by name,
count, or whatever?
Thanks.