Java Interactive Multithreading