I faced the following question during an interview:
What are the static and native methods of
Threadclass?
yieldstartjoinwait
I know about multi threading concepts, e.g.:
Thread t = new Thread();
t.start(); // Thread starting execution
t.join(); // (or t.wait()) thread state will go to waiting
However I fail to answer the interview question mentioned at the beginning of the post.
See the Java Thread doc.
http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html
Methods like
currentThread()sleep etc..atestaticin nature.There are few methods like
currentThreadisAliveetc arenative.Refer this.