当前位置: 代码迷 >> 综合 >> java.lang.Runnable
  详细解决方案

java.lang.Runnable

热度:54   发布时间:2024-01-10 16:06:57.0

【个人笔记搬运到博客系列】

ver:jdk1.8

@FunctionalInterface
public interface Runnable {/*** When an object implementing interface <code>Runnable</code> is used* to create a thread, starting the thread causes the object's* <code>run</code> method to be called in that separately executing* thread.* <p>* The general contract of the method <code>run</code> is that it may* take any action whatsoever.** @see     java.lang.Thread#run()*/public abstract void run();
}

通过实现Runnable接口创建线程;

//