It’s nothing but an idiom to use when threads communicate each other.
Example:
If we have 2 threads t1 and t2.
t1 is wait for some time whenever t2 will update the some resources if both the thread have some common resources,
then t1 should not do other things then I will go with 1 flag Guarded Blocks is nothing but we take 1 boolean variable flag if t2 perform its operation on the common resources flag will become true without use notify we can communicate between the thread.