Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the method called that is executed when a thread starts?
Think about where the thread's task is defined.
What do you need to do to create a thread using the Thread class?
Recall how you define a class in Java.
What is the purpose of the run() method in a thread?
Think about how threads do their work.
True or False: A class can both extend Thread and implement Runnable at the same time.
Consider general rules of class inheritance.
Create a Java program that demonstrates creating a timeout mechanism using threads. Identify how to use the Thread class and Runnable interface effectively.
Use sleep() and runnable tasks.
Design a thread-pool manager in Java that utilizes the Runnable interface. Outline the responsibilities of each component in your design.
Consider using ExecutorService for easy pooling.
4 more questions in this section. Enroll free to practise them all.
Enroll free