Search Results

Search found 1 results on 1 pages for 'user65374'.

Page 1/1 | 1 

  • Java: "implements Runnable" vs. "extends Thread"

    - by user65374
    From what time I've spent with threads in Java, I've found these two ways to write threads. public class ThreadA implements Runnable { public void run() { //Code } } //with a "new Thread(threadA).start()" call public class ThreadB extends Thread { public ThreadB() { super("ThreadB"); } public void run() { //Code } } //with a "threadB.start()" call Is there any significant difference in these two blocks of code?

    Read the article

1