This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

wait and notify methods  RSS feed

 
rama rajesh
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My req is after inserting each element in vector, it should be displaed.
inserting by one thread and displaying by other thread. both are using the same vector. can someone change the following code according to my requirement.
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rama,

Does the code do something that you don't expect?
And if there is a problem, what have you tried so far
to correct it? You are correct that wait() and notify()
will play a role here, in synchronized blocks of course.

Jim ...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!