madhawaseeeee

thread interface

Sep 18th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1.  public class MyRunnable implements Runnable {
  2.  
  3.     public void run(){
  4.        System.out.println("MyRunnable running");
  5.     }
  6.   }
  7.  
  8. //thread
  9. Thread thread = new Thread(new MyRunnable());
  10. thread.start();
Advertisement
Add Comment
Please, Sign In to add comment