Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Which Method is better to create thread and why???
2 Respostas
+ 8
The first way is to extend theĀ ThreadĀ class, override the run() method with the code you want to execute, thenĀ createĀ a new object from your class and callĀ start(). The second method is to pass an implementation of the Runnable interface to the constructor ofĀ Thread, then callĀ start().
0
from both method which 1 Better ? why?