implementing runnable interface in thread and use of this keyword
What is th开发者_运维技巧e purpose of implementing runnable interface in threads? and what is the purpose of "this" keyword? With examples
What is the purpose of implementing runnable interface in threads?
We can either extend Thread
which will implicitly implement Runnable
but then we can't extends
any other class, so implementing Runnable
is better approch
what is the purpose of "this" keyword?
this
refers to current object on which method is executing
精彩评论