Advertisement
Guest User

Untitled

a guest
May 27th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. public class MyThread extends Thread {
  2.     public MyThread(){
  3.         System.out.println("konstruqtori");
  4.     }
  5.  
  6.     public void run(){
  7.         System.out.println("bar");
  8.     }
  9.    
  10.     public void run(String s){
  11.         System.out.println("baz");
  12.     }
  13. }
  14.  
  15. public class rasdabechdavs {
  16.    
  17.     public static void main(String[] args){
  18.         MyThread t = new MyThread(){
  19.             public void run(){
  20.                 System.out.println("foo");
  21.             }
  22.         };
  23.         t.start();
  24.     }
  25.        
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement