为什么currentThread方法没有方法BODY?

时间:2015-09-11 12:11:25

标签: java

在java.lang包中的Thread类中,我们有

public class Thread implements Runnable{
    ...
    public static native Thread currentThread();
    ....
}

类Thread不是抽象类,为什么 currentThread 方法没有 BODY ??

1 个答案:

答案 0 :(得分:0)

native关键字表明此方法实现是内部的,而不是Java,而是依赖于平台的代码。

相关问题