Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class MyThread extends Thread {
  2.  
  3. @Override
  4. public void run() {
  5. System.out.println("Extending Thread class");
  6. }
  7. }
  8.  
  9. public class Main {
  10.  
  11. public static void main(String[] args) {
  12.  
  13. MyThread t1 = new MyThread();
  14. t1.start(); // Extending Thread class
  15.  
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement