Threads | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1


i don't get it how do i use them properly?

10th Sep 2016, 1:47 AM
1 Answer
+ 1
1) You need to create a class for your thread (extends Thread or implements Runnable. Or you can use something like this: new Thread(){ @Override public void run(){} };). 2) Add the 'run' void method. There your thread will do everything you need. 3) Create a thread object and call the 'run' method.
18th Oct 2016, 2:38 PM
Daniil Fomichev