又熟了 2022-01-09 10:18 采纳率: 78.6%
浏览 42
已结题

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

  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. }

  • 写回答

4条回答 默认 最新

  • 王胖胖_ 2022-01-09 11:29
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 9月25日
  • 已采纳回答 9月17日
  • 创建了问题 1月9日