// Bir thread yaratılacak.
public class ThreadTest implements Runnable {
ThreadTest() {
// Bir thread yaratılıyor ve kurucuda ThreadTest veriliyor.
Thread t = new Thread(this);
t.start();
System.out.println("Thread Başlatıldı");
}
// Thread çalıştığı zaman run method’u çağrılacak.
public void run() {
System.out.println("Thread Çalıştı");
}
public static void main(String[] args) {
ThreadTest t = new ThreadTest();
}
}
Dosyayı İndir