Check out example codes for "creating thread in java example". It will help you in understanding the concepts better.

Code Example 1

class Multi3 implements Runnable{  
public void run(){  
System.out.println("thread is running...");  
}  
  
public static void main(String args[]){  
Multi3 m1=new Multi3();  
Thread t1 =new Thread(m1);  
t1.start();  
 }  
}

Learn ReactJs, React Native from akashmittal.com