Multithreading some of the problems, boring time to do a

Source: Internet
Author: User

Both 1.C and Java are multithreaded languages. ()

2. if the thread dies, it cannot run. ()

3. in Java , high-priority running threads preempt low-priority threads. ()

4. The program developer must create a thread to manage the allocation of memory. ()

5. A thread will remain in the birth period until it invokes its start method. ()

6. when a stop () method is invoked for a thread that is in progress , the thread goes into hibernation. ()

7. if the thread's run method finishes executing or throws an exception that cannot be caught, the thread goes into a wait state. ()

8. a thread can call the yield method to give other threads a chance to run. ()

Second, the choice question

The 1.Java language provides a ▁▁ thread that automatically reclaims dynamically allocated memory.

A Async

B Consumer

C Guardian

D Garbage Collection

2. when the ▁▁ method terminates, it causes the thread to enter the dead state.

A Run

B setprority

C yield

D Sleep

3. use the ▁▁ method to change the priority of the thread.

A Run

B setprority

C yield

D Sleep

4. threads can get the processor with the same priority thread through the ▁▁ method.

A Run

B setprority

C yield

D Sleep

5. the thread can hibernate for a period of time through the ▁▁ method and then resume running.

A Run

B setprority

C yield

D Sleep

6. The▁▁ method causes the object to wait for the first thread in the queue to enter a ready state.

A Run

B Notify

C yield

D Sleep

7. Method Resume () is responsible for restarting the execution of the ▁▁ 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 ▁▁ method can be used to temporarily stop the current thread from running.

A Stop ()

B Sleep ()

C Wait ()

D suspend ()

Multithreading some of the problems, boring time to do a

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.