Java programming – Write a program for multi-threading where-in two threads are writing/reading from a file. Thread 1 is writing to a file while thread 2 is reading from the file. While Thread1 is writing Thread2 shall not read until Thread1 completes writing similarly until Thread2 complete reading Thread1 shall not write.

