• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Threads Doubt  RSS feed

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



OUTPUT-Inside Thread's subclass
possible reason for this beahviour(Correct me If I am wrong):
In the start function, from where run is called there is no information about the implementer of Runnable created?
OR
The run() inside the Thread's subclass is overriding the Runnable implementer's run?But how can Thread's subclass overrides Runnable implementer's run?

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a look in the Source Code of the Class Thread you see following method:



Since you override run() this code won't ever be executed. Instead your run method is called and print yout defined output
 
Gari Jain
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it.

Thankx a lot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!