Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Early Objects
Quiz 22: Multithreading
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
Which method do you call to make a thread ineligible to run on the CPU for a set number of milliseconds?
Question 2
Multiple Choice
Which of the following does not create an object that can run in a thread, assuming the following MyRunnable class declaration? public class MyRunnable implements Runnable { ...} i.Runnable runnable = new Runnable() ; II.Runnable runnable = new MyRunnable() ; III.MyRunnable runnable = new MyRunnable() ;
Question 3
Multiple Choice
Suppose run1 and run2 are objects of the class MyRunnable, which implements the Runnable interface.What is the result of the following calls? run1.run() ; run2.run() ;
Question 4
Multiple Choice
Which exception must be caught or declared when calling the sleep method?
Question 5
Multiple Choice
When a thread is interrupted, the most common response is to terminate the ____________ method.
Question 6
Multiple Choice
When a sleeping thread is interrupted, an InterruptedException is generated.Where do you catch that exception?
Question 7
Multiple Choice
Which of the following class declarations could run in a thread? i.public interface MyRunnable extends Runnable { ...} II.public class MyRunnable extends Runnable { ...} III.public class MyRunnable implements Runnable { ...}