开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜