Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt on MultiThread ?  RSS feed

 
Lalit Sahu
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  i have lot of doubts related to Thread Topic.

1)

2) 

Doubt :: Can we say question 1 and 2  are example of MultiThread??

In 1st question and 2nd question how many different thread are created and executed?

             
 
Sibendu Dey
Greenhorn
Posts: 22
Java Oracle Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MyThread does not implement Runnable. So code won't work anyway.
 
Campbell Ritchie
Marshal
Posts: 55680
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...and welcome to the Ranch

Please always tell us where such code comes from, to avoid copyright problems.
 
Lalit Sahu
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sibendu Dey wrote:MyThread does not implement Runnable. So code won't work anyway.


Forget to Write Implements Runnable.
Asume   Class MyThreads implements Runnable
 
Lalit Sahu
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:...and welcome to the Ranch

Please always tell us where such code comes from, to avoid copyright problems.

  Written my Me
 
Campbell Ritchie
Marshal
Posts: 55680
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!