Ran this program and then redirected input to slave.log
Ran the following check to verify it is working.
awk '^C%2 {print > "newfile"}' slave.log
grep -i slave1 newfile

I got no lines containing slave1 hence it works.

On doing some more research on the internet i found the following link ordered multi-threading in java .
This made me think that the above situation should not be present in any good design as this removes the parallelism for which threads are being used in the first place.

An inner class is which is declared as static is called a Nested class.
Inner classes have access to private members if the outer class.
You can have inner classes inside inner classes. They will have access to the outermost class members.