->There are two classes class A and Class B with a main() method.One main() method? Or one each?
They start thread in main().Each? One of them? Both of them? In the same JVM? Different JVMs?
if class A is running the Checker thread'The Checker thread' is meaningless. Do you mean a thread with that name? A thread whose Runnable is a class of that name? A class of that name which extends Thread?
then class B thread should wait unless and until class A finishes its executionIts execution of that thread? Its entire JVM?
->If Checker thread in Class A is sleeping then thread of class B should not start. Class B thread only start when class A thread is stopped.Again, which thread? Identified how? In the same JVM? Its own JVM?
What should I do to implement such synchronization between class A and B?