开发者

implementing runnable interface in thread and use of this keyword

开发者 https://www.devze.com 2023-02-10 09:34 出处:网络
What is th开发者_运维技巧e purpose of implementing runnable interface in threads? and what is the purpose of \"this\" keyword? With examples

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

精彩评论

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