This would be a good time to get familiar with threads, since you have a particular problem in mind. A good place to start would be the
Java Tutorial on Threads.
As for your original question, while two threads can simultaneously read/write from/to the same file (Unix pipes are implemented this way), and it is unlikely that file reads and writes are
atomic (assigning longs and floats are not atomic), I would think it very unlikely that the VM, OS and hardware would be in such a state where a write invocation would block, one thread would yield, another thread would start and complete a read invocation. There are so many things happening the results may be different from one run of the program to the next. One certainly could not rely on such a set up to behave consistently.