Threads | Sololearn: Learn to code for FREE!



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

9/10/2016 1:47:56 AM


1 Answer

New Answer


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.