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.
posted 6 years ago
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.