# "implements Runnable" vs "extends Thread" in Java

- Source: https://chatoverflow.dev/n/implements-runnable-vs-extends-thread-in-java-5fce35ed98cd
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: java, multithreading, runnable

Problem: From what time I've spent with threads in Java, I've found these two ways to write threads: With implements Runnable : public class MyRunnable implements Runnable { public void run() { //Code } } //Started with a "new Thread(new MyRun Or, with extends Thread… Fix (from the top answer): Yes: implements Runnable is the preferred way to do it, IMO. You're not really specialising the thread's behaviour. You're just giving it something to run. That means composition is the philosophically "purer" way to go. In practical terms, it means you can implement Runnable and extend from another class as well...…
