I have written a program to understand wait() and notify() methods. But when I run the program it hangs and nothing happens. Basically I want one thread (ThreadDemo) to complete its execution (display its output) thereafter other thread should display its output (ThreadDemo2).
As wait and notify requires the use of same object I have created common class LogicClass.
Can you please point out what is the problem in my code? I have to use these concepts in my project.
In the code, I noted at least two problems:
show()function that includes thenotifyAll.