Multi-threaded questions. When bored
1. Both C and Java are multi-threaded languages. ()
2. If the thread dies, it cannot run. ()
3. in Java, high-priority runnable threads will seize low-priority threads. ()
4. The program developer must create a thread to manage the memory allocation. ()
5. When a thread calls its start method, the thread will remain in its infancy. ()
6. When you call the stop () method of an ongoing thread, the thread enters the sleep state. ()
7. If the thread's run method execution ends or throws an exception that cannot be captured, the thread enters the waiting state. ()
8. One thread can call the yield method to run other threads. ()
Ii. multiple choice questions
1. a zookeeper thread is provided in Java to automatically recycle the dynamically allocated memory.
A asynchronous
B consumer
C daemon
D. Garbage Collection
2. When the zookeeper method is terminated, the thread enters the dead state.
A run
B setPrority
C yield
D sleep
3. The priority of a thread can be changed by using the sort priority method.
A run
B setPrority
C yield
D sleep
4. Threads can use the parallel processing method to obtain processors for threads with the same priority.
A run
B setPrority
C yield
D sleep
5. The thread can sleep for a period of time through the prepare thread method and resume running.
A run
B setPrority
C yield
D sleep
6. The prepare queue method enables the first thread of the object waiting for the queue to enter the ready state.
A run
B notify
C yield
D sleep
7. Method resume () is responsible for restarting the execution of the zookeeper thread.
A is stopped by the stop () method.
B is stopped by the sleep () method
C is stopped by the wait () method
D is stopped by the suspend () method
8. The pause method can be used to temporarily stop the running of the current thread.
A stop ()
B sleep ()
C wait ()
D suspend ()