File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
    Bookmark Topic Watch Topic
  • New Topic

Doubt with a thread question about notify() and wait() methods

 
Cheo Gomez
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi community im really stucked with these question, I dont understand why the run() method of MyThread is not called.



Thankyou very much
 
Henry Wong
author
Marshal
Pie
Posts: 20817
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Cheo Gomez wrote: Hi community im really stucked with these question, I dont understand why the run() method of MyThread is not called.



Thankyou very much



Hint: take a look at how your thread object is created.

 
Cheo Gomez
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thats the problem, I dont understand how it is created, Thread t1= new MyThread(sa);

 
Henry Wong
author
Marshal
Pie
Posts: 20817
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Cheo Gomez wrote:Thats the problem, I dont understand how it is created, Thread t1= new MyThread(sa);



Please don't change (meaning fix) code after the discussion -- add a new post with the changes instead. The original post now has code that works, and hence, the discussion doesn't make sense.

Henry
 
Cheo Gomez
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
sorry it was a typo error from me, but with the hint you gave to me, I fix the code for not creating a new topic, my apologies. Can I create a new one and delete this topic?
 
Henry Wong
author
Marshal
Pie
Posts: 20817
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Cheo Gomez wrote:sorry it was a typo error from me, but with the hint you gave to me, I fix the code for not creating a new topic, my apologies. Can I create a new one and delete this topic?


Don't worry about it. Glad you fixed it. Resolved and locked.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic