Creating and Using Threads
Important Points:
- We use the
Threadclass to create a new thread; - In order to pass a parameterless method into the thread class, we encapsulate it into a
ThreadStartobject. - A method with parameters can be executed by passing it into the
Treadclass after encapsulating it into aParameterizedThreadStartobject.
1. What constructor or method is used for creating a new method?
2. Which Thread constructor accepts a method with no parameters?
3. Which Thread constructor accepts a method with parameters?
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 2
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Suggested prompts:
Kysy minulta kysymyksiä tästä aiheesta
Tiivistä tämä luku
Näytä käytännön esimerkkejä
Awesome!
Completion rate improved to 3.7
Creating and Using Threads
Pyyhkäise näyttääksesi valikon
Important Points:
- We use the
Threadclass to create a new thread; - In order to pass a parameterless method into the thread class, we encapsulate it into a
ThreadStartobject. - A method with parameters can be executed by passing it into the
Treadclass after encapsulating it into aParameterizedThreadStartobject.
1. What constructor or method is used for creating a new method?
2. Which Thread constructor accepts a method with no parameters?
3. Which Thread constructor accepts a method with parameters?
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 2