为什么第一行出现了编译错误?

  1. public class Exercises3_1 extends Thread implements runable {

  2. public void run() {

  3. System.out.println("this is run()");

  4. }

  5. public static void main(String args[]) {

  6. Thread t = new Thread(new Exercises3_1());

  7. t.start();

  8. }

  9. }

1.runable写错了,是Runnable
2.继承Thread 或者 实现Runable ,只要有一个就可以了

直接继承Thread就行了吧

implements runable写错了吧,runable是你自己定义的接口吗?还是说默认调用Runnable来实现功能

Thread类已经实现了Runable这个接口,所以Exercises3_1再实现Runable会出错。
希望对题主有所帮助,望采纳!