Advertisement
gitman3

Thread simple extends

Jun 15th, 2023 (edited)
944
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. class MyThread extends Thread{
  2.     public void run(){
  3.         System.out.println("Thread RUN");
  4.     }
  5. }
  6.  
  7. public class MySimpleThreadDemo {
  8.     public static void main(String args[]){
  9.         System.out.println("Thread MAIN");
  10.         MyThread mt=new MyThread();
  11.         mt.start();
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement