Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why output is 1 2 only?

 
Minhaj Mehmood
Ranch Hand
Posts: 400
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is from K&B;

 
Raju Champaklal
Ranch Hand
Posts: 521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
because once the wait is called on the thread.which has the lock of the args objcect...it keeps waiting till someone notifies to resume again and get the lock of args...........

got it?
 
Raju Champaklal
Ranch Hand
Posts: 521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i created this code to notify...i get the answer 1 2 3...but please someone check this if am right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic